-
Notifications
You must be signed in to change notification settings - Fork 181
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: move token-bridge-sdk inside the ui package #752
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…idge into refactor-remove-sdk-2
…idge into refactor-remove-sdk-2
…idge into refactor-remove-sdk-2
@@ -1,4 +1,4 @@ | |||
import { Transaction, AssetType } from 'token-bridge-sdk' | |||
import { Transaction, AssetType } from '../../../src/token-bridge-sdk' |
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.
token-bridge-sdk
alias import was not getting correctly resolved in e2e/tests. Probably because of multiple tsconfig.json
at each level. Tried redefining the alias in different tsconfigs but couldn't catch a break.
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.
Generally looks good
2 comments concerning some minor changes
I'd prefer we keep the changes as minimal as possible to avoid unexpected bugs stemming from subtle changes
packages/arb-token-bridge-ui/src/token-bridge-sdk/hooks/__tests__/useBalance.test.tsx
Outdated
Show resolved
Hide resolved
@@ -11,7 +11,7 @@ import { PropsWithChildren } from 'react' | |||
import { MultiCaller } from '@arbitrum/sdk' | |||
|
|||
// Create a new cache for every test | |||
const Container = ({ children }: PropsWithChildren<{}>) => ( | |||
const Container = ({ children }: PropsWithChildren<any>) => ( |
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.
Could we use unknown
instead of any
here?
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.
Done
export * from './hooks/arbTokenBridge.types' | ||
export * from './hooks/useBalance' | ||
export * from './hooks/useTransactions' | ||
export * from './util/index' |
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.
Is there a reason we want to export everything compared to exporting only the methods that are used on token bridge (like we've had it so far)?
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.
Reverted now to keep the diffs minimal.
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.
Addressed review pointers.
export * from './hooks/arbTokenBridge.types' | ||
export * from './hooks/useBalance' | ||
export * from './hooks/useTransactions' | ||
export * from './util/index' |
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.
Reverted now to keep the diffs minimal.
packages/arb-token-bridge-ui/src/token-bridge-sdk/hooks/__tests__/useBalance.test.tsx
Outdated
Show resolved
Hide resolved
@@ -11,7 +11,7 @@ import { PropsWithChildren } from 'react' | |||
import { MultiCaller } from '@arbitrum/sdk' | |||
|
|||
// Create a new cache for every test | |||
const Container = ({ children }: PropsWithChildren<{}>) => ( | |||
const Container = ({ children }: PropsWithChildren<any>) => ( |
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.
Done
Closes #611