Skip to content

Commit

Permalink
fix: readonly wallet array (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
tien authored Oct 22, 2024
1 parent d34ae44 commit a70ae51
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/chatty-comics-attend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"dot-connect": patch
---

Fixed issue where readonly wallet array are not accepted.
2 changes: 1 addition & 1 deletion packages/dot-connect/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { walletsOrAggregators } from "./stores.js";
import type { Wallet, WalletAggregator } from "@reactive-dot/core/wallets.js";

export type Options = {
wallets: Array<Wallet | WalletAggregator>;
wallets: ReadonlyArray<Wallet | WalletAggregator>;
};

export function registerDotConnect(options: Options) {
Expand Down
6 changes: 3 additions & 3 deletions packages/dot-connect/src/stores.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import { Wallet, WalletAggregator } from "@reactive-dot/core/wallets.js";
import { Observable, combineLatest } from "rxjs";
import { map } from "rxjs/operators";

export const walletsOrAggregators = signal<Array<Wallet | WalletAggregator>>(
[],
);
export const walletsOrAggregators = signal<
ReadonlyArray<Wallet | WalletAggregator>
>([]);

const directWallets = computed(() =>
walletsOrAggregators.value.filter(
Expand Down

0 comments on commit a70ae51

Please sign in to comment.