File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff 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 ) ) {
You can’t perform that action at this time.
0 commit comments