sdk
sdk copied to clipboard
Fix-import-for-check-balance-for-parcel-bundler
Similar to #182
I brought up the previous issue(#182) in lifi-discord, the issue was fixed with getTokenBalance
but a similar issue remained with execute
function.
Description :
- Importing
checkBalance
from "./balance" causes error whileSwapping
in thewidget
or using execute insdk
, when building with parcel, Scope hoisting introduces errors where an export is undefined.
More info here : https://github.com/parcel-bundler/parcel/issues/6071
- Changed the import of
checkBalance
function and directly imported it from ./balance/checkBalance , swapping now works perfectly - Updated the unit test with the new import changes
Tested out the changes by using the library locally and Swapping works fine with these changes
@Harman-singh-waraich Hey, have you tried v3 to see if the issue is present there?
@Harman-singh-waraich Hey, have you tried v3 to see if the issue is present there?
Hey, haven't had the chance to use v3 yet, as for the issue , we were facing it with parcel. Since then we have migrated to Vite and haven't seen the issue. Will update to v3 to see if there's any issue, will keep you updated.
Great! Feel free to add to this discussion or open a new one if you have any issue :)