Skip to content

Commit

Permalink
fix(livesdklogic): adjust gas setting to be on par with lld
Browse files Browse the repository at this point in the history
  • Loading branch information
ComradeAERGO committed Apr 26, 2024
1 parent 882c77d commit c67871c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
6 changes: 6 additions & 0 deletions .changeset/old-teachers-march.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"live-mobile": minor
---

Standardize PrepareSignTx behavior\

Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,15 @@ import BigNumber from "bignumber.js";

export default function prepareSignTransaction(
account: AccountLike,
parentAccount: Account | undefined,
liveTx: Partial<Transaction & { gasLimit: BigNumber }>,
parentAccount: Account | null | undefined,
liveTx: Partial<
Transaction & {
gasLimit: BigNumber;
}
>,
): TransactionCommon {
const bridge = getAccountBridge(account, parentAccount);
const t = bridge.createTransaction(account);
const { recipient, ...txData } = liveTx;
const t2 = bridge.updateTransaction(t, {
recipient,
return bridge.updateTransaction(liveTx, {
subAccountId: isTokenAccount(account) ? account.id : undefined,
});

return bridge.updateTransaction(t2, {
customGasLimit: txData.gasLimit,
type: 1,
maxFeePerGas: undefined,
maxPriorityFeePerGas: undefined,
...txData,
});
}

0 comments on commit c67871c

Please sign in to comment.