aboutsummaryrefslogtreecommitdiff
path: root/src/crypto/cryptoApi-test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypto/cryptoApi-test.ts')
-rw-r--r--src/crypto/cryptoApi-test.ts23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/crypto/cryptoApi-test.ts b/src/crypto/cryptoApi-test.ts
index 39f46c5c3..d9d42081c 100644
--- a/src/crypto/cryptoApi-test.ts
+++ b/src/crypto/cryptoApi-test.ts
@@ -22,6 +22,7 @@ import {
DenominationRecord,
DenominationStatus,
ReserveRecord,
+ ReserveRecordStatus,
} from "../dbTypes";
import { CryptoApi } from "./cryptoApi";
@@ -86,18 +87,18 @@ test("precoin creation", async t => {
const crypto = new CryptoApi(new NodeCryptoWorkerFactory());
const { priv, pub } = await crypto.createEddsaKeypair();
const r: ReserveRecord = {
- created: 0,
- current_amount: null,
- exchange_base_url: "https://example.com/exchange",
+ created: { t_ms: 0 },
+ currentAmount: null,
+ exchangeBaseUrl: "https://example.com/exchange",
hasPayback: false,
- precoin_amount: { currency: "PUDOS", value: 0, fraction: 0 },
- requested_amount: { currency: "PUDOS", value: 0, fraction: 0 },
- reserve_priv: priv,
- reserve_pub: pub,
- timestamp_confirmed: 0,
- timestamp_depleted: 0,
- timestamp_reserve_info_posted: 0,
- exchangeWire: "payto://foo"
+ precoinAmount: { currency: "PUDOS", value: 0, fraction: 0 },
+ requestedAmount: { currency: "PUDOS", value: 0, fraction: 0 },
+ reservePriv: priv,
+ reservePub: pub,
+ timestampConfirmed: undefined,
+ timestampReserveInfoPosted: undefined,
+ exchangeWire: "payto://foo",
+ reserveStatus: ReserveRecordStatus.UNCONFIRMED,
};
const precoin = await crypto.createPreCoin(denomValid1, r);