diff --git a/src/services/eth-network/eth-network.ts b/src/services/eth-network/eth-network.ts index 62b35c837..5a7b9f989 100644 --- a/src/services/eth-network/eth-network.ts +++ b/src/services/eth-network/eth-network.ts @@ -45,7 +45,11 @@ export class EthNetwork { throw new Error('Invalid "to" address'); } const rpcProvider = await getRpcProvider(provider); - const nonce = await rpcProvider.getTransactionCount(from, 'latest'); + let nonce: number | undefined; + + if (provider.isEVM) { + nonce = await rpcProvider.getTransactionCount(from, 'latest'); + } const transaction = { to: to, diff --git a/src/services/eth-sign.ts b/src/services/eth-sign.ts index d2dcfd1d7..cf9977507 100644 --- a/src/services/eth-sign.ts +++ b/src/services/eth-sign.ts @@ -64,7 +64,7 @@ const prepareTransaction = async (from: string, tx: TransactionRequest) => { tx.value = ZERO_HEX_NUMBER; } - if (!tx.nonce) { + if (!tx.nonce && Provider.selectedProvider.isEVM) { const rpcProvider = await app.getRpcProvider(); tx.nonce = await rpcProvider.getTransactionCount(from, 'latest'); } diff --git a/src/services/sign-json-rpc-request.ts b/src/services/sign-json-rpc-request.ts index aed181ae0..8a183d733 100644 --- a/src/services/sign-json-rpc-request.ts +++ b/src/services/sign-json-rpc-request.ts @@ -164,7 +164,11 @@ export class SignJsonRpcRequest { : request.params; const {address} = await instanceProvider.getAccountInfo(path); - const nonce = await rpcProvider.getTransactionCount(address, 'latest'); + let nonce: number | undefined; + + if (Provider.selectedProvider.isEVM) { + nonce = await rpcProvider.getTransactionCount(address, 'latest'); + } const minGas = new Balance(signTransactionRequest.gasLimit ?? 0);