Skip to content

Commit

Permalink
Merge pull request #290 from terra-money/fix/extension
Browse files Browse the repository at this point in the history
Fix/extension
  • Loading branch information
Geoff Lee authored May 29, 2022
2 parents 870e74d + a2aecdc commit f2450bf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/extension/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ interface Option extends CreateTxOptions {
purgeQueue?: boolean; // default true
sequence?: number;
accountNumber?: number;
isClassic?: boolean; // default fase. set to true when you intract with terra Classic
}

interface SignBytesOption {
Expand Down Expand Up @@ -170,7 +171,7 @@ export class Extension {
sign(options: Option): number {
return this.send('sign', {
...options,
msgs: options.msgs.map(msg => msg.toJSON()),
msgs: options.msgs.map(msg => msg.toJSON(options.isClassic)),
fee: options.fee?.toJSON(),
memo: options.memo,
gasPrices: options.gasPrices?.toString(),
Expand Down Expand Up @@ -218,7 +219,7 @@ export class Extension {
*/
post(options: Option): number {
return this.send('post', {
msgs: options.msgs.map(msg => msg.toJSON()),
msgs: options.msgs.map(msg => msg.toJSON(options.isClassic)),
fee: options.fee?.toJSON(),
memo: options.memo,
gasPrices: options.gasPrices?.toString(),
Expand Down

0 comments on commit f2450bf

Please sign in to comment.