Conversation
Lev-Stambler
commented
May 14, 2021
- Publish packages to NPM script
- Move token <--> indivisible units to utils
- Move Pair to interfaces cause circular dependencies
- Add ChainAsType to improve ease of use for external apps using the library
|
Deployment failed with the following error: |
Sladuca
left a comment
There was a problem hiding this comment.
Looks great! Just one small change and possibly another - see comments for more details
| import { Env } from './configs'; | ||
| import { Pair } from './misc'; | ||
|
|
||
| export type ChainAsType = 'near' | 'ethereum'; |
There was a problem hiding this comment.
What exactly does this do? Is this for code I wrote a long time ago that expected it to be a type and not a enum?
There was a problem hiding this comment.
This is just to make the api easier for the library. Like you can do tokenInfo('near') instead of Chains.Near
| "@toruslabs/torus-direct-web-sdk": "^4.11.1" | ||
| }, | ||
| "peerDependencies": {} | ||
| } |
There was a problem hiding this comment.
Can you add an exports property here so that we can import it like @baf-wallet/core/interfaces instead of having to do @baf-wallet/core/src/interfaces to get interfaces (and similarly for other non-default libs)?
see https://webpack.js.org/guides/package-exports/ for more information