Skip to content

Commit

Permalink
fixup create form object
Browse files Browse the repository at this point in the history
  • Loading branch information
Thykof committed Jul 12, 2024
1 parent f977fc9 commit 8c0eef4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
21 changes: 13 additions & 8 deletions smart-contract/assembly/__tests__/tests.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,19 @@ describe('Scheduler app test', () => {
// mock allowance
mockScCall(u256ToBytes(amount));

const params = new Args()
.add(tokenAddress)
.add(spender)
.add(recipient)
.add(amount)
.add(interval)
.add(occurrences)
.add(tolerance);
const schedule = new Schedule(
0,
tokenAddress,
spender,
recipient,
amount,
interval,
occurrences,
occurrences,
tolerance,
);

const params = new Args().add(schedule);

startScheduleSendFT(params.serialize());

Expand Down
2 changes: 1 addition & 1 deletion smart-contract/assembly/contracts/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export function startScheduleSendFT(binaryArgs: StaticArray<u8>): void {
checkAllowance(
schedule.tokenAddress,
schedule.spender,
amount * u256.fromU64(occurrences), // TODO: use SafeMathU256
schedule.amount * u256.fromU64(schedule.occurrences), // TODO: use SafeMathU256
);
scheduleAllSendFT(schedule);
pushSchedule(schedule);
Expand Down

0 comments on commit 8c0eef4

Please sign in to comment.