diff --git a/public/logos/evmos.png b/public/logos/evmos.png new file mode 100644 index 00000000..e801519d Binary files /dev/null and b/public/logos/evmos.png differ diff --git a/public/logos/juno.png b/public/logos/juno.png new file mode 100644 index 00000000..30f5011b Binary files /dev/null and b/public/logos/juno.png differ diff --git a/src/chains/mainnet/evmos.json b/src/chains/mainnet/evmos.json index a8d9f119..731ccf90 100644 --- a/src/chains/mainnet/evmos.json +++ b/src/chains/mainnet/evmos.json @@ -6,9 +6,9 @@ "snapshot_provider": "", "sdk_version": "0.45.1", "coin_type": "60", - "min_tx_fee": "3000000000000000", + "min_tx_fee": "5000000000000000", "addr_prefix": "evmos", - "logo": "/logos/evmos.jpeg", + "logo": "/logos/evmos.png", "keplr_features": ["ibc-transfer", "ibc-go", "eth-address-gen", "eth-key-sign"], "assets": [{ "base": "aevmos", diff --git a/src/chains/mainnet/juno.json b/src/chains/mainnet/juno.json index 6aaccb2d..6c8ca19d 100644 --- a/src/chains/mainnet/juno.json +++ b/src/chains/mainnet/juno.json @@ -8,7 +8,7 @@ "coin_type": "118", "min_tx_fee": "3000", "addr_prefix": "juno", - "logo": "/logos/juno.jpg", + "logo": "/logos/juno.png", "assets": [{ "base": "ujuno", "symbol": "JUNO", diff --git a/src/libs/client/EthereumLedgerSigner.ts b/src/libs/client/EthereumLedgerSigner.ts index f8218f8f..ab72f178 100644 --- a/src/libs/client/EthereumLedgerSigner.ts +++ b/src/libs/client/EthereumLedgerSigner.ts @@ -54,6 +54,14 @@ export class EthereumLedgerSigner implements OfflineAminoSigner{ algo: "secp256k1" // should be 'ethsecp256k1' } return [x2, x1] + }).catch(e=> { + if(e.toString().indexOf('0x6b0c')> 0) { + throw new Error('Please unlock your Ledger first') + } + if(e.toString().indexOf('0x6e00')> 0) { + throw new Error('Please open Ethereum app on the Ledger!') + } + throw e }) }; @@ -85,7 +93,6 @@ export class EthereumLedgerSigner implements OfflineAminoSigner{ signed: signDoc, signature } - console.log(result, output) return output }) } diff --git a/src/libs/client/MessageAdapter.ts b/src/libs/client/MessageAdapter.ts index c83f2df7..93db81e0 100644 --- a/src/libs/client/MessageAdapter.ts +++ b/src/libs/client/MessageAdapter.ts @@ -64,7 +64,8 @@ export class BeginRedelegateMessageAdapter implements MessageAdapter { export class DelegateMessageAdapter implements MessageAdapter { toProto(message: EncodeObject) { const param = message.value - return createMsgDelegate(param.delegatorAddress, param.validatorAddress, param.amount[0].amount, param.amount[0].denom) + const amount = Array.isArray(param.amount) ? param.amount[0] : param.amount + return createMsgDelegate(param.delegatorAddress, param.validatorAddress, amount.amount, amount.denom) } getTypes() { return MSG_DELEGATE_TYPES @@ -74,7 +75,8 @@ export class DelegateMessageAdapter implements MessageAdapter { export class SendMessageAdapter implements MessageAdapter { toProto(message: EncodeObject) { const param = message.value - return createMsgSend(param.fromAddress, param.toAddress, param.amount[0].amount, param.amount[0].denom) + const amount = Array.isArray(param.amount) ? param.amount[0] : param.amount + return createMsgSend(param.fromAddress, param.toAddress, amount.amount, param.amount.denom) } getTypes() { return MSG_SEND_TYPES @@ -84,7 +86,8 @@ export class SendMessageAdapter implements MessageAdapter { export class UndelegateMessageAdapter implements MessageAdapter { toProto(message: EncodeObject) { const param = message.value - return createMsgUndelegate(param.delegatorAddress, param.validatorAddress, param.amount[0].amount, param.amount[0].denom) + const amount = Array.isArray(param.amount) ? param.amount[0] : param.amount + return createMsgUndelegate(param.delegatorAddress, param.validatorAddress, amount.amount, amount.denom) } getTypes() { return MSG_UNDELEGATE_TYPES diff --git a/src/libs/client/PingWalletClient.ts b/src/libs/client/PingWalletClient.ts index e267a6a4..f9542f27 100644 --- a/src/libs/client/PingWalletClient.ts +++ b/src/libs/client/PingWalletClient.ts @@ -156,6 +156,10 @@ export class SigningEthermintClient { this.signer.prefix = fromBech32(signerAddress).prefix const account = await this.signer.getAccounts() + const acc = account.find(x => x.address === signerAddress) + if(!acc) { + throw new Error('The signer address dose not exsits in Ledger!') + } const sender = { accountAddress: signerAddress, sequence: explicitSignerData.sequence, @@ -240,7 +244,6 @@ function makeRawTx(sender, messages, memo, fee, signature, registry): TxRaw { signatures: [fromHex(signature)], }); - console.log("rawTx", rawTx) return rawTx }