-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor: use SDK amount.Amount
type to store token amounts
#2868
base: development
Are you sure you want to change the base?
Refactor: use SDK amount.Amount
type to store token amounts
#2868
Conversation
👷 Deploy request for wormhole-connect pending review.Visit the deploys page to approve it
|
👷 Deploy request for wormhole-connect-mainnet pending review.Visit the deploys page to approve it
|
12da662
to
fd9ec15
Compare
amount.Amount
type to store balancesamount.Amount
type to store token amounts
0adb5b5
to
e13a839
Compare
e13a839
to
0ce6865
Compare
[props.routes, props.quotesMap], | ||
); | ||
const allRoutesFailed = useMemo(() => { | ||
if (Object.keys(props.quotesMap).length === 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this fixes a bug unrelated to amount.Amount
refactor: if you run every
on an empty array, it always returns true
.
@@ -39,7 +39,6 @@ const useFetchSupportedRoutes = (): HookReturn => { | |||
supported = await route.isRouteSupported( | |||
token, | |||
destToken, | |||
amount, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this argument was never used by isRouteSupported
@@ -1,37 +0,0 @@ | |||
import { TransferInfo } from '../utils/sdkv2'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we delete this file since it's now empty?
Changes
Balance
type, andamount
values in Redux, to store anamount.Amount
, not anumber
formatAmount
helper function (not required anymore)Overall cleans things up and net removal of code
https://www.loom.com/share/3b0d63df72c04b7182a41e0ca173e9cc