6
6
import * as bitcoinJS from 'bitcoinjs-lib' ;
7
7
import AngorProjectRepository from '../../repositories/AngorProjectRepository' ;
8
8
import AngorInvestmentRepository from '../../repositories/AngorInvestmentRepository' ;
9
- import DB from '../../database' ;
10
9
11
10
describe ( 'AngorTransactionDecoder' , ( ) => {
12
11
describe ( 'Decoding transaction for Angor project creation' , ( ) => {
@@ -18,8 +17,8 @@ describe('AngorTransactionDecoder', () => {
18
17
founderKeyHashHex :
19
18
'68828edc1c6312c915c8967475be57f42d45764105af8216f2da7170d033240a' ,
20
19
founderKeyHashInt : 3493012490 ,
21
- projectIdDeriviation : 1746506245 ,
22
- projectId : 'angor1qzkfpckm2vnhdvfcwr7vdhwt7ns3rd95gr0age0 ' ,
20
+ projectIdDeriviation : 1345528842 ,
21
+ projectId : 'angor1quc59k4kt0nv62xhj72xtqfmzk55cexxmf6pkz7 ' ,
23
22
nostrEventId : '0f2d8db8568bd3e12bdab1faa217fffc80459053967eff8bde0a65f14e2b7079' ,
24
23
addressOnFeeOutput : 'tb1quc59k4kt0nv62xhj72xtqfmzk55cexxmae8lyc' ,
25
24
txid : '0d28976a42bf7618ad9470cf0202e2eb06d6072e75e139eab012a160b7b480aa' ,
@@ -261,23 +260,6 @@ describe('AngorTransactionDecoder', () => {
261
260
data . projectIdDeriviation
262
261
) ;
263
262
} ) ;
264
-
265
- it ( 'should throw an error if the retention is greater than 2 in power of 31' , ( ) => {
266
- jest
267
- . spyOn ( angorDecoder as any , 'hashToInt' )
268
- . mockImplementation ( ( ) => Math . pow ( 2 , 31 ) * 2 + 2 ) ;
269
-
270
- const keyHash = angorDecoder [ 'getKeyHash' ] ( keyHex ) ;
271
- const keyHashInt = angorDecoder [ 'hashToInt' ] ( keyHash ) ;
272
-
273
- expect ( ( ) =>
274
- angorDecoder [ 'getProjectIdDerivation' ] ( keyHashInt )
275
- ) . toThrow (
276
- new Error (
277
- `Retention is too large. The max number is 2^31 (2,147,483,648).`
278
- )
279
- ) ;
280
- } ) ;
281
263
} ) ;
282
264
283
265
describe ( 'getProjectId' , ( ) => {
0 commit comments