-
Notifications
You must be signed in to change notification settings - Fork 0
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
Adding method to get wallets #4
Conversation
) { | ||
this.host = this.options?.isDevelopment | ||
? "http://localhost:3000" | ||
: "https://api.wally.xyz"; |
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.
Above are formatting fixes, seems like prettier formatting in latest code is not correct.
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.
Looks good generally but one question to clarify.
src/index.ts
Outdated
return (await resp.json()) as Promise<SignedMessage>; | ||
} | ||
|
||
public async getWallets(): Promise<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.
Q: What is this method going to be used for?
For a given app, I'm thinking that a single user will have only a single wallet so this may be better as getWallet
instead, returning a single 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.
A: The function is going to be used to get user wallets.
I am not sure if there is a constraint about number of wallets user can have, I anyways updated the method to return first wallet returned by the api.
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.
Q: Does that take into account that the list of wallets (including the first wallet) are for the specific app that the token was generated for?
@mjmayank I think there was a brief mention for either one wallet per app per use or maybe a user can have multiple wallets with one app but I can't remember what the answer was.
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.
for now let's assume a user has one wallet per app
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.
Looks good. Just one question; more for precaution's sake.
Adding method to get user wallet.