-
Notifications
You must be signed in to change notification settings - Fork 212
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
fix: multiple deposits of unknown brand #7027
Conversation
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.
interesting approach.
@@ -374,11 +374,13 @@ export const prepareSmartWallet = (baggage, shared) => { | |||
return E(invitationPurse).deposit(payment); | |||
} | |||
|
|||
// When there is no purse, queue the payment | |||
// When there is no purse, save the payment into a queue. | |||
// It's not yet ever read but a future version of the contract can |
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.
Interesting... so we don't yet trigger deposits when new issuers come along, but we support upgrade to a wallet that does.
Hm... is there a way for somebody to send an ERTP payment with a brand not known to the vbank? I can't think of one. I was thinking we might owe an issue for the case of newly-approved tokens, but I think we're internally consistent as-is.
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 think that's right
if (queues.has(brand)) { | ||
queues.get(brand).push(payment); | ||
const extant = queues.get(brand); | ||
queues.set(brand, harden([...extant, payment])); |
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.
this seems to be the gist of it.
8bdc1a5
to
45bff83
Compare
closes: #6961
Description
Makes a new array instead of try to push to the hardened one. Also improved docs on how unknown brand deposits are handled.
Security Considerations
Scaling Considerations
Documentation Considerations
Testing Considerations
Failing test now passing.