Skip to content

Commit

Permalink
feat: add dymension chain support
Browse files Browse the repository at this point in the history
  • Loading branch information
manu0466 committed Apr 8, 2024
1 parent 0decd43 commit 7b563be
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ export const signAndBroadcastEthermint = async (
const aminoMessages = messages.map((m) => aminoTypes.toAmino(m));

const isInjective = account.networkId === StakingNetworkId.Injective;
const emptyCosmosSignatures = account.networkId === StakingNetworkId.Dymension;

const timeoutHeight = isInjective
? BigInt(currentHeight) + BigInt(500)
Expand Down Expand Up @@ -346,6 +347,7 @@ export const signAndBroadcastEthermint = async (
typeUrl,
value: ExtensionOptionsWeb3Tx.encode(
ExtensionOptionsWeb3Tx.fromPartial({
feePayer: emptyCosmosSignatures ? account.address : undefined,
feePayerSig: fromBase64(signature.signature),
typedDataChainId: EthermintChainIdHelper.parse(
signed.chain_id,
Expand Down Expand Up @@ -387,7 +389,7 @@ export const signAndBroadcastEthermint = async (
: undefined,
}),
).finish(),
signatures: [fromBase64(signature.signature)],
signatures: !emptyCosmosSignatures ? [fromBase64(signature.signature)] : [new Uint8Array(0)],
});

const tx = TxRaw.encode(txRaw).finish();
Expand Down

0 comments on commit 7b563be

Please sign in to comment.