Skip to content

Commit 5af4fad

Browse files
committed
fix: use the same large number old V1 uses as the NO_TIMEOUT_VALUE instead of 0
- 0 in the contract is an immediate timeout and can cause problems with later features
1 parent a107df9 commit 5af4fad

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/model/MetaEvidence.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ interface ExtraData {
2020
"Contract Information"?: string;
2121
}
2222

23+
export const NO_TIMEOUT_VALUE = 8640000000000000;
24+
2325
export interface MetaEvidence {
2426
aliases: Record<string, string>;
2527
amount: string;

src/utils/metaEvidence.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { EscrowToken } from "model/EscrowToken";
2-
import type { MetaEvidence } from "model/MetaEvidence";
2+
import { NO_TIMEOUT_VALUE, type MetaEvidence } from "model/MetaEvidence";
33
import { parseZonedDateTime } from "@internationalized/date";
44
import { ipfsPost } from "./ipfs";
55

@@ -61,7 +61,7 @@ export async function uploadMetaEvidence({
6161
receiver: receiverAddress,
6262
sender: senderAddress,
6363
subCategory: escrowType,
64-
timeout: 0, //No automatic payments yet
64+
timeout: NO_TIMEOUT_VALUE, //No automatic payments yet
6565
title: title,
6666
token: {
6767
address: token.address,

0 commit comments

Comments
 (0)