Skip to content

Commit

Permalink
problem: change fee for restored tx
Browse files Browse the repository at this point in the history
  • Loading branch information
BOOMER74 committed Dec 29, 2023
1 parent 35c19ff commit 198f756
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions packages/core/src/transaction/workflow/TxBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,24 +148,33 @@ export class TxBuilder implements BuilderOrigin {
return this.convertEthereumTx(createTx);
}

this.mergeEthereumFee(createTx);
this.mergeEthereumTx(transaction, createTx);
}

if (isChanged) {
if (isErc20ApproveCreateTx(createTx)) {
if (isErc20ApproveCreateTx(createTx)) {
if (isChanged) {
return this.transformErc20ApproveTx(createTx);

Check warning on line 157 in packages/core/src/transaction/workflow/TxBuilder.ts

View check run for this annotation

Codecov / codecov/patch

packages/core/src/transaction/workflow/TxBuilder.ts#L157

Added line #L157 was not covered by tests
}

if (isErc20ConvertCreateTx(createTx)) {
this.mergeEthereumFee(createTx);
}

if (isErc20ConvertCreateTx(createTx)) {
if (isChanged) {
return this.transformErc20ConvertTx(createTx);

Check warning on line 165 in packages/core/src/transaction/workflow/TxBuilder.ts

View check run for this annotation

Codecov / codecov/patch

packages/core/src/transaction/workflow/TxBuilder.ts#L165

Added line #L165 was not covered by tests
}

if (isEtherRecoveryCreateTx(createTx) || isErc20RecoveryCreateTx(createTx)) {
this.mergeEthereumFee(createTx);
}

if (isEtherRecoveryCreateTx(createTx) || isErc20RecoveryCreateTx(createTx)) {
if (isChanged) {
return this.convertEthereumRecoveryTx(createTx);
}
}

this.mergeEthereumFee(createTx);
this.mergeEthereumFee(createTx);
}
}
}

Expand Down

0 comments on commit 198f756

Please sign in to comment.