Skip to content

Commit

Permalink
Fix simulate gas in evmos
Browse files Browse the repository at this point in the history
  • Loading branch information
harisato committed Dec 20, 2022
1 parent 8cda0b3 commit 687283b
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/simulate/safe.simulate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { SimulateUtils } from './utils';
import { IndexerClient } from 'src/utils/apis/IndexerClient';
import { TX_TYPE_URL } from 'src/common/constants/app.constant';
import { Chain } from 'src/entities';
import { makeMultisignedTxEvmos } from 'src/chains';

export class SafeSimulate {
signature: string;
Expand Down Expand Up @@ -75,13 +76,15 @@ export class SafeSimulate {
);

// create signature and authInfo
const multisignedTx = makeMultisignedTx(
this.pubkey,
sequence,
fee,
bodyBytes,
signatures,
);
const multisignedTx = this.chain.chainId.startsWith('evmos')
? makeMultisignedTxEvmos(
this.pubkey,
sequence,
fee,
bodyBytes,
signatures,
)
: makeMultisignedTx(this.pubkey, sequence, fee, bodyBytes, signatures);

this.signature = toBase64(multisignedTx.signatures[0]);
this.authInfo = toBase64(multisignedTx.authInfoBytes);
Expand Down

0 comments on commit 687283b

Please sign in to comment.