Skip to content

Commit

Permalink
Update default selector config
Browse files Browse the repository at this point in the history
  • Loading branch information
aryzing committed Apr 8, 2024
1 parent 94cd716 commit cb8afeb
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 33 deletions.
9 changes: 5 additions & 4 deletions example/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

106 changes: 82 additions & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@
]
},
"dependencies": {
"@sats-connect/core": "0.0.4",
"@sats-connect/ui": "0.0.3"
"@sats-connect/core": "0.0.4-caef0cb",
"@sats-connect/ui": "0.0.3-07f4874",
"@sats-connect/make-default-provider-config": "0.0.1-38d3294"
},
"devDependencies": {
"husky": "^8.0.3",
Expand All @@ -32,7 +33,7 @@
"rimraf": "^3.0.2",
"ts-jest": "^29.0.5",
"tsup": "^8.0.2",
"typescript": "^4.9.4"
"typescript": "5"
},
"repository": {
"type": "git",
Expand Down
6 changes: 4 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
removeDefaultProvider,
RpcErrorCode,
BaseAdapter,
createDefaultConfig,
} from '@sats-connect/core';
import {
Config,
Expand All @@ -21,6 +20,7 @@ import {
walletOpen,
walletClose,
} from '@sats-connect/ui';
import { makeDefaultConfig } from '@sats-connect/make-default-provider-config';

loadSelector();

Expand Down Expand Up @@ -48,9 +48,11 @@ class Wallet {
throw new Error('No wallets detected, may want to prompt user to install a wallet.');
}

console.log('[ARY]: providers', providers);

const selectorConfig = this.createCustomConfig
? this.createCustomConfig(providers)
: createDefaultConfig(providers);
: makeDefaultConfig(providers);
const nextProviderId = await selectWalletProvider(selectorConfig);
this.providerId = nextProviderId;
}
Expand Down

0 comments on commit cb8afeb

Please sign in to comment.