Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/cede-store/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web3-onboard/cede-store",
"version": "2.0.1",
"version": "2.0.2-alpha.1",
"description": "cede.store SDK wallet module for connecting to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
"keywords": [
"Ethereum",
Expand Down
17 changes: 11 additions & 6 deletions packages/cede-store/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,19 @@ function cedeStoreWallet(): WalletInit {
return Promise.resolve({
provider: createEIP1193Provider(window.cede, {
eth_requestAccounts: async ({ baseRequest }) => {
const vaults = (await baseRequest({
const accounts = (await baseRequest({
method: 'connect'
})) as []
return vaults.length > 0
? ['To access cede.store vaults and accounts, use cede provider']
: []
})) as any[]

if (!accounts.length) {
return []
}

const activeVault = accounts.find(account => account.isActive)

return [activeVault?.name || accounts[0].name] as string[]
},
eth_chainId: () => Promise.resolve('0x0'), // cede.store doesn't support chains, but we have to provide a value to complete the connection
eth_chainId: () => Promise.resolve('0x1'), // cede.store doesn't support chains, but we have to provide a value to complete the connection
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to the existing chainId to fix this error:
image

wallet_switchEthereumChain: null,
wallet_addEthereumChain: null,
eth_getBalance: null,
Expand Down