-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Description
The initNear takes a wallet selector as input. Currently, if the wallet selector creates a function access key for a contract that is not the SocialDB (for example, the user wants to login to use hello.near-examples.testnet, the following lines will logOut the user:
Lines 22 to 32 in 8dbb065
| near.connectedContractId = walletState?.contract?.contractId; | |
| if ( | |
| near.connectedContractId && | |
| near.connectedContractId !== near.config.contractName | |
| ) { | |
| const selector = await near.selector; | |
| const wallet = await selector.wallet(); | |
| await wallet.signOut(); | |
| near.connectedContractId = null; | |
| walletState = selector.store.getState(); | |
| } |
This is because the VM is checking if the selector being used is connected to the socialDB, and otherwise calling wallet.signOut
I would expect people to mix interactions with the VM with interactions to other contracts. In fact, I discovered this problem while trying to create a Hello World example that can talk with both BOS components, and a simple hello world smart contract.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels