Skip to content

Commit

Permalink
feat(sdk): support network params for stash wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
bruceeewong committed Oct 17, 2024
1 parent 4c1998a commit 7fefba2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/sdk/src/wallet-standard/stashed-wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ export const registerStashedWallet: RegisterWalletCallbackExternal = (
input: RegisterWalletCallbackInput
): UnregisterWalletCallback => {
const wallets = getWallets();
const { appName, origin, network = "mainnet" } = input;
const wallet = new StashedWallet({
name: input.appName,
origin: input.origin,
name: appName,
origin: origin,
network: network,
});

const unregister = wallets.register(wallet);
Expand Down
1 change: 1 addition & 0 deletions packages/sdk/src/wallet/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export type UnregisterWalletCallback = () => void;
export type RegisterWalletCallbackInput = {
appName: string;
origin?: string;
network?: "mainnet" | "testnet";
};
export type RegisterWalletCallbackExternal = (
input: RegisterWalletCallbackInput
Expand Down

0 comments on commit 7fefba2

Please sign in to comment.