-
Notifications
You must be signed in to change notification settings - Fork 154
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
Removed contractId and added made contracts required, signAndSendTran… #847
Removed contractId and added made contracts required, signAndSendTran… #847
Conversation
…saction now requires receiverId
@amirsaran3 when it will be merged? |
…change-fix fix near-mobile-wallet, near-snap and ramper-wallet methods
@amirsaran3 @kujtimprenkuSQA Can we merge this PR? |
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.
Hi @gtsonevv, my comments are mostly around the TS type for the contracts
in the core
package I left a detailed comment to explain the reason for this suggestion in the store.ts
file.
If you don't think this is a necessary change you might ignore them 👍 , but if you do the change then you need to update the checks in signAndSendTransaction(s)
// From this
// Note: this is just an example.
if (!_state.wallet.isSignedIn() || contracts.length < 1) {
throw new Error("Wallet not signed in");
}
// To something like this:
if (!_state.wallet.isSignedIn() || !contracts) {
throw new Error("Wallet not signed in");
}
The docs / readme.md in modal-ui
and modal-ui-js
must be updated to reflect the changes of this MR.
packages/core/src/lib/services/wallet-modules/wallet-modules.service.ts
Outdated
Show resolved
Hide resolved
@gtsonevv the PR looks good to me, I think the docs should be updated because this PR introduces breaking changes so the docs will be outdated. I only reviewed the code which looks good to me, but the decision to merge it needs to be made by your team. You can mark my previous comments as resolved 👍 |
@kujtimprenkuSQA Perfect! Which docs exactly? |
The code example and the Options in this file (there's no The code example and the Options on this file: This PR removes the In |
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.
r+
Description
This PR is an extension of #811. Addressing comments of Daryl on mentioned PR.
Breaking changes:
contractId
fromsetupModal
paramscontracts
param insetupModal
is now requiredreceiverId
param insignAndSendTransaction
is now required since we can't assume a default contract since we can have multipleTODO:
signInMulti
method right now we can't test it correctly. I am not sure how will the pending state act after these changes (for browser wallets).Questions:
signInMulti
method with one contract incontracts
param list is same as callingsignIn
method? Any notable differences?signInMulti
method #811 (comment). If user first signs in using two contracts and then one of them expires. He then only wants to re-sign in to the expired one and the other one is still signed in. How will the UI flow work for this interaction? Since the user is signed in they will not see a prompt to sign in again.Checklist:
Type of change.