Skip to content

Commit

Permalink
CU-86ducqd5h - NEON3 - Error "The method eth_sendTransaction is not s…
Browse files Browse the repository at this point in the history
…upported" when trying to wrap Neo X GAS through Ghost Market
  • Loading branch information
raulduartep committed Aug 14, 2024
1 parent bae0479 commit 1c17860
Show file tree
Hide file tree
Showing 4 changed files with 164 additions and 8 deletions.
151 changes: 147 additions & 4 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@cityofzion/bs-neo3": "1.2.0",
"@cityofzion/neon-core": "5.5.1",
"@cityofzion/neon-js": "5.5.1",
"@cityofzion/wallet-connect-sdk-wallet-core": "4.3.1",
"@cityofzion/wallet-connect-sdk-wallet-core": "4.3.2",
"@cityofzion/wallet-connect-sdk-wallet-react": "4.0.16",
"@electron-toolkit/preload": "^2.0.0",
"@electron-toolkit/utils": "^2.0.0",
Expand Down Expand Up @@ -112,4 +112,4 @@
"vite-plugin-node-polyfills": "^0.17.0",
"vite-plugin-svgr": "^3.2.0"
}
}
}
6 changes: 4 additions & 2 deletions src/main/walletConnect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@ export class WalletConnectEIP155Adapter extends AbstractWalletConnectEIP155Adapt
}

async getRPCUrl(params: TAdapterMethodParam): Promise<string> {
const { networkByBlockchain } = await getStoreAccountFromWCSession(params)
return networkByBlockchain.ethereum.url
const { networkByBlockchain, account } = await getStoreAccountFromWCSession(params)
if (!account) throw new Error('Account not found')

return networkByBlockchain[account.blockchain].url
}

async getCustomSigner(params: TAdapterMethodParam): Promise<TCustomSigner | undefined> {
Expand Down
11 changes: 11 additions & 0 deletions src/renderer/src/routes/modals/DappPermission/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@ const componentsByBlockchain: Partial<
eth_call: EthereumSendTransactionDappPermission,
eth_sendRawTransaction: EthereumSendTransactionDappPermission,
},
neox: {
personal_sign: EthereumSignMessageDappPermission,
eth_sign: EthereumSignMessageDappPermission,
eth_signTransaction: EthereumSignTransactionDappPermission,
eth_signTypedData: EthereumSignTypedDataDappPermission,
eth_signTypedData_v3: EthereumSignTypedDataDappPermission,
eth_signTypedData_v4: EthereumSignTypedDataDappPermission,
eth_sendTransaction: EthereumSendTransactionDappPermission,
eth_call: EthereumSendTransactionDappPermission,
eth_sendRawTransaction: EthereumSendTransactionDappPermission,
},
}

export const DappPermissionModal = () => {
Expand Down

0 comments on commit 1c17860

Please sign in to comment.