From a524042c58cb99842cf68249eadb3dbe007aa415 Mon Sep 17 00:00:00 2001 From: cmd Date: Mon, 16 Oct 2023 00:07:05 -0500 Subject: [PATCH] update --- src/lib/contract.ts | 23 ++++++++++++----------- src/lib/deposit.ts | 1 - src/schema/contract.ts | 1 + src/schema/deposit.ts | 1 - src/types/contract.ts | 1 + src/types/deposit.ts | 1 + 6 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/lib/contract.ts b/src/lib/contract.ts index 414bfb4c..2613391c 100644 --- a/src/lib/contract.ts +++ b/src/lib/contract.ts @@ -39,17 +39,18 @@ export function create_contract ( fees, published, session, - activated : null, - deadline : get_deadline(proposal, published), - expires : null, - funds : [], - outputs : get_spend_outputs(proposal, fees), - state : null, - status : 'published', - terms : proposal, - total : proposal.value + get_pay_total(fees), - tx : null, - witness : [] + activated : null, + deadline : get_deadline(proposal, published), + expires : null, + funds : [], + outputs : get_spend_outputs(proposal, fees), + state : null, + status : 'published', + terms : proposal, + total : proposal.value + get_pay_total(fees), + tx : null, + updated_at : published, + witness : [] } } diff --git a/src/lib/deposit.ts b/src/lib/deposit.ts index 653337f5..b740670b 100644 --- a/src/lib/deposit.ts +++ b/src/lib/deposit.ts @@ -60,7 +60,6 @@ export function init_deposit ( covenant : null, expires_at : null, settled : false, - txid : null, updated_at : null } } diff --git a/src/schema/contract.ts b/src/schema/contract.ts index 6098b1fe..b00f95d4 100644 --- a/src/schema/contract.ts +++ b/src/schema/contract.ts @@ -60,6 +60,7 @@ const data = z.object({ published : stamp, terms : proposal.data, total : num, + updated_at : stamp, witness : witness.array(), }) diff --git a/src/schema/deposit.ts b/src/schema/deposit.ts index 662cef97..ea0cd038 100644 --- a/src/schema/deposit.ts +++ b/src/schema/deposit.ts @@ -33,7 +33,6 @@ const data = template.extend({ covenant : covenant.nullable(), expires_at : stamp.nullable(), settled : bool, - txid : hash.nullable(), updated_at : stamp.nullable() }) diff --git a/src/types/contract.ts b/src/types/contract.ts index dab58f3b..501019d4 100644 --- a/src/types/contract.ts +++ b/src/types/contract.ts @@ -36,6 +36,7 @@ export interface ContractData { terms : ProposalData total : number tx : null | TxStatus + updated_at : number, witness : WitnessEntry[] } diff --git a/src/types/deposit.ts b/src/types/deposit.ts index 6fdc6239..c8cb1521 100644 --- a/src/types/deposit.ts +++ b/src/types/deposit.ts @@ -32,6 +32,7 @@ export interface DepositTemplate { export interface DepositMeta { confirmed : boolean covenant : CovenantData | null + expires_at : number | null settled : boolean updated_at : number | null }