-
Notifications
You must be signed in to change notification settings - Fork 747
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: create wallet namespace #1051
refactor: create wallet namespace #1051
Conversation
src/index.ts
Outdated
@@ -43,6 +43,7 @@ export * from './utils/calldata/enum'; | |||
export * from './utils/contract'; | |||
export * from './utils/events'; | |||
export * from './utils/transactionReceipt'; | |||
export * as wallet from './wallet/wallet'; |
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.
I know there was a discussion about this on Discord, but if we have a better idea not to have wallet/wallet
? I know naming is the hardest thing in development and I'm nitpicking xD
cc @tabaktoni
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.
Do you prefer a file called walletAPI.ts
?
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.
One possibility is to use export * as wallet from './wallet'
in src/wallet/index.ts
in place of export * from './connect'
instead of removing it (could even keep the connect
file name).
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.
I went back to connect.ts
, keeping export * as wallet
.
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.
Ok, lgtm
* refactor: create wallet namespace * fix: change name to connect.ts --------- Co-authored-by: Toni Tabak <tabaktoni@gmail.com>
Motivation and Resolution
Wallet API functions have to be imported one by one
from "starknet"
Create a
wallet
namespace is solving this problem, and will group all methods related to this subject.Usage related changes
Development related changes
connect.ts
renamedwallet.ts
Checklist: