Skip to content

Commit e16ddd2

Browse files
committed
resolve request changes
1 parent 282aff5 commit e16ddd2

3 files changed

Lines changed: 4 additions & 28 deletions

File tree

  • packages

packages/eth-deposit-to-different-address/scripts/exec.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,6 @@ const main = async () => {
4141
const isCustomGasTokenChain =
4242
ethBridger.nativeToken && ethBridger.nativeToken !== constants.AddressZero;
4343

44-
if (isCustomGasTokenChain) {
45-
console.log('Custom gas token chain detected');
46-
}
47-
4844
/**
4945
* First, let's check the balance of the destination address
5046
*/
@@ -56,12 +52,8 @@ const main = async () => {
5652
*/
5753
if (isCustomGasTokenChain) {
5854
console.log('Giving allowance to the deployed token to transfer the chain native token');
59-
const approvalTransactionRequest = await ethBridger.getApproveGasTokenRequest({
60-
erc20ParentAddress: ethBridger.nativeToken,
61-
parentProvider: parentChainProvider,
62-
});
6355
const approvalTransaction = await ethBridger.approveGasToken({
64-
txRequest: approvalTransactionRequest,
56+
erc20ParentAddress: ethBridger.nativeToken,
6557
parentSigner: parentChainWallet,
6658
});
6759

packages/eth-deposit/scripts/exec.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,6 @@ const main = async () => {
4141
const isCustomGasTokenChain =
4242
ethBridger.nativeToken && ethBridger.nativeToken !== constants.AddressZero;
4343

44-
if (isCustomGasTokenChain) {
45-
console.log('Custom gas token chain detected');
46-
}
47-
4844
/**
4945
* First, let's check the wallet's initial balance in the child chain
5046
*/
@@ -56,12 +52,8 @@ const main = async () => {
5652
*/
5753
if (isCustomGasTokenChain) {
5854
console.log('Giving allowance to the deployed token to transfer the chain native token');
59-
const approvalTransactionRequest = await ethBridger.getApproveGasTokenRequest({
60-
erc20ParentAddress: ethBridger.nativeToken,
61-
parentProvider: parentChainProvider,
62-
});
6355
const approvalTransaction = await ethBridger.approveGasToken({
64-
txRequest: approvalTransactionRequest,
56+
erc20ParentAddress: ethBridger.nativeToken,
6557
parentSigner: parentChainWallet,
6658
});
6759

packages/token-deposit/scripts/exec.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,6 @@ const main = async () => {
5353
const isCustomGasTokenChain =
5454
erc20Bridger.nativeToken && erc20Bridger.nativeToken !== constants.AddressZero;
5555

56-
if (isCustomGasTokenChain) {
57-
console.log('Custom gas token chain detected');
58-
}
59-
6056
/**
6157
* We get the address of the parent-chain gateway for our DappToken,
6258
* which will later help us get the initial token balance of the bridge (before deposit)
@@ -114,12 +110,8 @@ const main = async () => {
114110
*/
115111
if (isCustomGasTokenChain) {
116112
console.log('Giving allowance to the deployed token to transfer the chain native token');
117-
const approvalTransactionRequest = await erc20Bridger.getApproveGasTokenRequest({
118-
erc20ParentAddress: erc20Bridger.nativeToken,
119-
parentProvider: parentChainProvider,
120-
});
121-
const approvalTransaction = await erc20Bridger.approveGasToken({
122-
txRequest: approvalTransactionRequest,
113+
const approvalTransaction = await ethBridger.approveGasToken({
114+
erc20ParentAddress: ethBridger.nativeToken,
123115
parentSigner: parentChainWallet,
124116
});
125117

0 commit comments

Comments
 (0)