@chromia/bridge-client
Advanced tools
Comparing version 2.1.1 to 2.2.0
@@ -1780,2 +1780,16 @@ "use strict"; | ||
}, | ||
checkAllowance() { | ||
return __async(this, null, function* () { | ||
try { | ||
return yield erc20Token.allowance( | ||
signer.address, | ||
options.bridgeAddress | ||
); | ||
} catch (error) { | ||
throw new ERC20TokenTransactionError( | ||
`Failed to check allowance on ERC20 token contract: ${error}` | ||
); | ||
} | ||
}); | ||
}, | ||
depositToEvmBridgeContract(amount, evmKeyStore) { | ||
@@ -1782,0 +1796,0 @@ return __async(this, null, function* () { |
@@ -35,2 +35,8 @@ import { ContractTransactionResponse } from 'ethers'; | ||
/** | ||
* Checks the allowance of the ERC20 token. | ||
* | ||
* @returns {Promise<bigint>} A promise resolving to the allowance of the ERC20 token. | ||
*/ | ||
checkAllowance(): Promise<bigint>; | ||
/** | ||
* Deposits an asset to the EVM bridge contract. | ||
@@ -37,0 +43,0 @@ * |
14
index.js
@@ -1788,2 +1788,16 @@ "use strict"; | ||
}, | ||
checkAllowance() { | ||
return __async(this, null, function* () { | ||
try { | ||
return yield erc20Token.allowance( | ||
signer.address, | ||
options.bridgeAddress | ||
); | ||
} catch (error) { | ||
throw new ERC20TokenTransactionError( | ||
`Failed to check allowance on ERC20 token contract: ${error}` | ||
); | ||
} | ||
}); | ||
}, | ||
depositToEvmBridgeContract(amount, evmKeyStore) { | ||
@@ -1790,0 +1804,0 @@ return __async(this, null, function* () { |
{ | ||
"name": "@chromia/bridge-client", | ||
"version": "2.1.1", | ||
"version": "2.2.0", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
556139
15731