Skip to content

Commit

Permalink
fix: Estimate gas for v3 syntax fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholaspai committed Feb 21, 2024
1 parent 8733080 commit 84d0fe0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@across-protocol/sdk-v2",
"author": "UMA Team",
"version": "0.22.3",
"version": "0.22.4",
"license": "AGPL-3.0",
"homepage": "https://docs.across.to/v/developer-docs/developers/across-sdk",
"files": [
Expand Down
22 changes: 18 additions & 4 deletions src/utils/SpokeUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,35 @@ export function populateV3Relay(
deposit: V3Deposit,
repaymentChainId = deposit.destinationChainId
): Promise<PopulatedTransaction> {
const v3RelayData: V3RelayData = {
depositor: deposit.depositor,
recipient: deposit.recipient,
exclusiveRelayer: deposit.exclusiveRelayer,
inputToken: deposit.inputToken,
outputToken: deposit.outputToken,
inputAmount: deposit.inputAmount,
outputAmount: deposit.outputAmount,
originChainId: deposit.originChainId,
depositId: deposit.depositId,
fillDeadline: deposit.fillDeadline,
exclusivityDeadline: deposit.exclusivityDeadline,
message: deposit.message,
};
if (isDefined(deposit.speedUpSignature)) {
assert(isDefined(deposit.updatedRecipient) && deposit.updatedRecipient !== ZERO_ADDRESS);
assert(isDefined(deposit.updatedOutputAmount));
assert(isDefined(deposit.updatedMessage));
return spokePool.populateTransaction.fillV3RelayWithUpdatedDeposit([
deposit,
return spokePool.populateTransaction.fillV3RelayWithUpdatedDeposit(
v3RelayData,
repaymentChainId,
deposit.updatedOutputAmount,
deposit.updatedRecipient,
deposit.updatedMessage,
deposit.speedUpSignature,

Check warning on line 45 in src/utils/SpokeUtils.ts

View workflow job for this annotation

GitHub Actions / Lint

Delete `,`
]);
);
}

return spokePool.populateTransaction.fillV3Relay([deposit, repaymentChainId]);
return spokePool.populateTransaction.fillV3Relay(v3RelayData, repaymentChainId);
}

/**
Expand Down

0 comments on commit 84d0fe0

Please sign in to comment.