Skip to content
This repository was archived by the owner on Jul 6, 2022. It is now read-only.

Commit 768c22e

Browse files
committed
fix: 🐛 make dates relatives to the current date
the example must show the same result any time the user run it
1 parent 7f2c2f2 commit 768c22e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

examples/generalTransferManager.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,13 @@ window.addEventListener('load', async () => {
104104
const randomBeneficiary2 = '0x5544444444444444444444444444444444444444';
105105

106106
// Add beneficiaries in the whitelist with distant dates to send and receive
107+
const delay = 10000000000;
108+
107109
await generalTM.modifyKYCDataMulti({
108110
investors: [randomBeneficiary1, randomBeneficiary2],
109-
canSendAfter: [new Date(2020, 0), new Date(2020, 0)],
110-
canReceiveAfter: [new Date(2020, 0), new Date(2020, 0)],
111-
expiryTime: [new Date(2020, 0), new Date(2020, 0)],
111+
canSendAfter: [new Date(Date.now().valueOf() + delay), new Date(Date.now().valueOf() + delay)],
112+
canReceiveAfter: [new Date(Date.now().valueOf() + delay), new Date(Date.now().valueOf() + delay)],
113+
expiryTime: [new Date(Date.now().valueOf() + delay), new Date(Date.now().valueOf() + delay)],
112114
});
113115

114116
// Mint yourself some tokens

0 commit comments

Comments
 (0)