-
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
Add Signer login #94
Add Signer login #94
Conversation
} | ||
|
||
getAddress() { | ||
this.checkAinInitiated(); |
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.
ain 초기화가 되면 signer가 무조건 있나요?
signer가 있다면 무조건 defaultAddress가 있는게 맞나요?
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.
ain 초기화시 defaultSigner가 반드시 생성됩니다. 이 때 defaultSigner에서 getAddress() 는 defaultWalletAddress 를 반환합니다.
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.
default account가 세팅되지 않은 경우 해당 부분에서 에러를 던지네요. 기존 getAddress에서는 해당 경우에 null을 반환했기 때문에 try-catch 문으로 null 반환하도록 변경하겠습니다.
추가적으로 defaultAccount 존재 유무를 확인하는 코드들의 수정이 덜 이루어진것을 발견하여 같이 수정하도록 하겠습니다.
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.
넵 그부분만 수정하고 merge해주세요!
/** | ||
* Login to ainize using AIN Wallet Signer. | ||
*/ | ||
async loginWithSigner() { |
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.
login with 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.
wallet 이란 명명이 web3에서 관념적으로 사용되는 의미나 ain-js에서 사용되는 등 혼동될 가능성이 있을 것 같습니다.
그러나 signer도 가독성 좋은 명명인지는 확신이 없어서, 우선 회의때 논의되었던 명명인 loginWithSigner로 merge하고 추후 관련하여 다시 논의하면 좋을 것 같습니다.
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.
넵
@@ -64,14 +85,14 @@ export default class AinModule { | |||
return await this.ain!.db.ref(path).getValue(); | |||
} | |||
|
|||
private async _sendTransaction(data: TransactionBody) { | |||
private async _sendTransaction(txBody: TransactionBody) { |
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.
사용하는 코드들도 바꾸어주어야 하지 않나요?
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.
파라메터 변수 명만 변경되어 호출부에선 변경 필요 없을 것 같습니다
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.
아 맞네요 확인했습니다~
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.
LGTM
Thanks!
Thanks for the review! |
Ain Wallet Signer Login을 추가함에 따라 몇 가지 로직이 변경되었습니다.