use keccak256 hash of campaignPBM address and sourceReferenceID as the pendingPaymentList mapping key (new paymentUniqueID).
NOTE: initially wanted to use hash of from and sourceReferenceID but it won't work for grab use case because from will be individual grab user wallet hence the hashed result will be different for different user with the same sourceRefereneceID.
add unique check for the hashed key paymentUniqueID
add indexed fields in the events for easier log filtering.
To be discussed
does the indexed field make sense?
TODO (will be included in the next PR)
[ ] document the design and implementation (WIP)
[ ] cancel and refund implementation (ready to create PR)
What does this PR do
update function param name to
sourceReferenceID
use keccak256 hash of
campaignPBM
address andsourceReferenceID
as thependingPaymentList
mapping key (newpaymentUniqueID
).NOTE: initially wanted to use hash of
from
andsourceReferenceID
but it won't work for grab use case becausefrom
will be individual grab user wallet hence the hashed result will be different for different user with the samesourceRefereneceID
.add unique check for the hashed key
paymentUniqueID
add indexed fields in the events for easier log filtering.
To be discussed
TODO (will be included in the next PR)