From 30832231d29e0fed6dc9a17ab8aec33823110cda Mon Sep 17 00:00:00 2001 From: junderw Date: Tue, 29 Jun 2021 08:26:52 +0900 Subject: [PATCH] Fix tests --- payreq.js | 2 +- test/fixtures.json | 54 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 1 deletion(-) diff --git a/payreq.js b/payreq.js index d3c348d..c628315 100644 --- a/payreq.js +++ b/payreq.js @@ -26,7 +26,7 @@ const REGTESTNETWORK = { bech32: 'bcrt', pubKeyHash: 0x6f, scriptHash: 0xc4, - validWitnessVersions: [0], + validWitnessVersions: [0] } const SIMNETWORK = { bech32: 'sb', diff --git a/test/fixtures.json b/test/fixtures.json index bc188c0..315fad4 100644 --- a/test/fixtures.json +++ b/test/fixtures.json @@ -248,6 +248,27 @@ ] } }, + { + "data": { + "satoshis": 12, + "network": { + "bech32": "bcrt", + "pubKeyHash": 111, + "scriptHash": 196, + "validWitnessVersions": [0] + }, + "tags": [ + { + "tagName": "payment_hash", + "data": "0001020304050607080900010203040506070809000102030405060708090102" + }, + { + "tagName": "description", + "data": "ナンセンス 1杯" + } + ] + } + }, { "data": { "network": { @@ -1104,6 +1125,39 @@ ], "wordsTemp": "temp1pvjluezpp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqdq5xysxxatsyp3k7enxv4jsxqzpuaztrnwngzn3kdzw5hydlzf03qdgm2hdq27cqv3agm2awhz5se903vruatfhq77w3ls4evs3ch9zw97j25emudupq63nyw24cg27h2rsp6tg0jg" }, + { + "complete": true, + "millisatoshis": "12000", + "payeeNodeKey": "03e7156ae33b0a208d0744199163177e909e80176e55d97a2f221ede0f934dd9ad", + "paymentRequest": "lnbcrt120n1psd5ks5pp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqdpquwpc4curk03c9wlrswe78q4eyqc7d8d0xqrrsscqpfktzsxs25he76dx2d672r7j4sm7q4quts763pwemg8chgayn96p3sny6cqm0lfxa768cetu7rupzpf7ujmsnmnpsjaukgdah8nkecd4gp6h56uu", + "prefix": "lnbcrt120n", + "recoveryFlag": 1, + "satoshis": 12, + "signature": "b2c5034154be7da6994dd7943f4ab0df81507170f6a21767683e2e8e9265d06309935806dff49bbed1f195f3c3e04414fb92dc27b98612ef2c86f6e79db386d5", + "tags": [ + { + "tagName": "payment_hash", + "data": "0001020304050607080900010203040506070809000102030405060708090102" + }, + { + "tagName": "description", + "data": "ナンセンス 1杯" + }, + { + "tagName": "expire_time", + "data": 3600 + }, + { + "tagName": "min_final_cltv_expiry", + "data": 9 + } + ], + "timeExpireDate": 1624926244, + "timeExpireDateString": "2021-06-29T00:24:04.000Z", + "timestamp": 1624922644, + "timestampString": "2021-06-28T23:24:04.000Z", + "wordsTemp": "temp1psd5ks5pp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqdpquwpc4curk03c9wlrswe78q4eyqc7d8d0xqrrsscqpfktzsxs25he76dx2d672r7j4sm7q4quts763pwemg8chgayn96p3sny6cqm0lfxa768cetu7rupzpf7ujmsnmnpsjaukgdah8nkecd4gp9hjc0v" + }, { "paymentRequest": "lnbc20m1pvjluezpp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqhp58yjmdan79s6qqdhdzgynm4zwqd5d7xmw5fk98klysy043l2ahrqscc6gd6ql3jrc5yzme8v4ntcewwz5cnw92tz0pc8qcuufvq7khhr8wpald05e92xw006sq94mg8v2ndf4sefvf9sygkshp5zfem29trqq2yxxz7", "network": {