Skip to content

Commit

Permalink
feat(wc): allow user to connect wallet without signing a cert on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenvechain committed Nov 2, 2023
1 parent fb9ca9f commit b5c0887
Show file tree
Hide file tree
Showing 22 changed files with 392 additions and 532 deletions.
171 changes: 0 additions & 171 deletions apps/sample-react-app/src/Components/ConnectWalletModal.tsx

This file was deleted.

111 changes: 0 additions & 111 deletions apps/sample-react-app/src/Components/WalletSourceRadio.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions apps/sample-react-app/src/Components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@ export * from './AccountDetailModal';
export * from './AddressButton';
export * from './AddressIcon';
export * from './SwitchWalletButton';
export * from './ConnectWalletModal';
export * from './WalletSourceRadio';
1 change: 1 addition & 0 deletions apps/sample-vue-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"private": true,
"scripts": {
"build": "vue-cli-service build",
"clean": "rm -rf dist node_modules .turbo",
"dev": "vue-cli-service serve",
"lint": "vue-cli-service lint"
},
Expand Down
12 changes: 6 additions & 6 deletions apps/sample-vue-app/src/connex/ConnexProvider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default defineComponent({
walletState.source = null;
};
const connexInstance = createConnexInstance({
const connex = createConnexInstance({
nodeUrl: 'https://mainnet.vechain.org/',
onDisconnected,
});
Expand All @@ -55,21 +55,21 @@ export default defineComponent({
};
const updateSource = (source: WalletSource) => {
connexInstance.setSource(source);
connex.wallet.setSource(source);
walletState.source = source;
};
const connex: Connex = {
thor: connexInstance.thor,
vendor: connexInstance.vendor,
const _connex: Connex = {
thor: connex.thor,
vendor: connex.vendor,
};
const walletActions: WalletActions = {
updateAccount,
updateSource,
};
provide(ConnexSymbol, readonly(connex));
provide(ConnexSymbol, readonly(_connex));
provide(WalletStateSymbol, toRefs(readonly(walletState)));
provide(WalletActionsSymbol, readonly(walletActions));
},
Expand Down
Loading

0 comments on commit b5c0887

Please sign in to comment.