Skip to content

Commit 647e159

Browse files
committed
merged release
2 parents 5e367b3 + ba08566 commit 647e159

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@socket.tech/widget",
3-
"version": "0.0.13",
3+
"version": "0.0.14",
44
"main": "dist/index.js",
55
"module": "dist/index.es.js",
66
"types": "dist/index.d.ts",

src/components/Input.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,13 +240,19 @@ export const Input = ({
240240
updateInputAmount(_formattedAmount);
241241
parseInputAmount(_formattedAmount);
242242
}
243-
244243
// Condition to leave some native tokens for transaction fee.
245244
if (sourceToken.address === NATIVE_TOKEN_ADDRESS) {
246245
// subtracting min gas from the total amount
247246
const minGas =
248247
mappedChainData[sourceChainId].currency.minNativeCurrencyForGas;
249-
const minGasBN = ethers.BigNumber.from(minGas);
248+
let minGasBN;
249+
minGasBN = ethers.BigNumber.from(minGas);
250+
251+
// In case of ethereum we have divided the value by 1.7
252+
if(sourceChainId === 1){
253+
minGasBN = minGasBN.mul(17);
254+
minGasBN = minGasBN.div(10);
255+
}
250256
const balanceBN = ethers.BigNumber.from(balance);
251257

252258
if (minGasBN.lt(balanceBN)) {

0 commit comments

Comments
 (0)