@@ -19,10 +19,6 @@ import {
1919} from '../resources/bld' ;
2020import should = require( 'should' ) ;
2121
22- import { loadWebAssembly } from '@bitgo/sdk-opensslbytes' ;
23-
24- const openSSLBytes = loadWebAssembly ( ) . buffer ;
25-
2622describe ( 'BLD' , function ( ) {
2723 let bitgo : TestBitGoAPI ;
2824 let basecoin ;
@@ -378,16 +374,13 @@ describe('BLD', function () {
378374 } ) ;
379375
380376 it ( 'should recover funds for non-bitgo recoveries' , async function ( ) {
381- const res = await basecoin . recover (
382- {
383- userKey : wrwUser . userPrivateKey ,
384- backupKey : wrwUser . backupPrivateKey ,
385- bitgoKey : wrwUser . bitgoPublicKey ,
386- walletPassphrase : wrwUser . walletPassphrase ,
387- recoveryDestination : destinationAddress ,
388- } ,
389- openSSLBytes
390- ) ;
377+ const res = await basecoin . recover ( {
378+ userKey : wrwUser . userPrivateKey ,
379+ backupKey : wrwUser . backupPrivateKey ,
380+ bitgoKey : wrwUser . bitgoPublicKey ,
381+ walletPassphrase : wrwUser . walletPassphrase ,
382+ recoveryDestination : destinationAddress ,
383+ } ) ;
391384 res . should . not . be . empty ( ) ;
392385 res . should . hasOwnProperty ( 'serializedTx' ) ;
393386 sandBox . assert . calledOnce ( basecoin . getAccountBalance ) ;
@@ -406,18 +399,15 @@ describe('BLD', function () {
406399 } ) ;
407400
408401 it ( 'should redelegate funds to new validator' , async function ( ) {
409- const res = await basecoin . redelegate (
410- {
411- userKey : wrwUser . userPrivateKey ,
412- backupKey : wrwUser . backupPrivateKey ,
413- bitgoKey : wrwUser . bitgoPublicKey ,
414- walletPassphrase : wrwUser . walletPassphrase ,
415- amountToRedelegate : '10000000000000000' ,
416- validatorSrcAddress : 'agoricvaloper1wy3h3gne94xpmnjwfwd3eyaytv9g4nj6yykkkj' ,
417- validatorDstAddress : 'agoricvaloper1qd0h2hj7uljjhktw9l3fjnz5u22g0xu74aw38w' ,
418- } ,
419- openSSLBytes
420- ) ;
402+ const res = await basecoin . redelegate ( {
403+ userKey : wrwUser . userPrivateKey ,
404+ backupKey : wrwUser . backupPrivateKey ,
405+ bitgoKey : wrwUser . bitgoPublicKey ,
406+ walletPassphrase : wrwUser . walletPassphrase ,
407+ amountToRedelegate : '10000000000000000' ,
408+ validatorSrcAddress : 'agoricvaloper1wy3h3gne94xpmnjwfwd3eyaytv9g4nj6yykkkj' ,
409+ validatorDstAddress : 'agoricvaloper1qd0h2hj7uljjhktw9l3fjnz5u22g0xu74aw38w' ,
410+ } ) ;
421411
422412 res . should . not . be . empty ( ) ;
423413 res . should . hasOwnProperty ( 'serializedTx' ) ;
@@ -462,58 +452,46 @@ describe('BLD', function () {
462452
463453 it ( 'should throw error if backupkey is not present' , async function ( ) {
464454 await basecoin
465- . recover (
466- {
467- userKey : wrwUser . userPrivateKey ,
468- bitgoKey : wrwUser . bitgoPublicKey ,
469- walletPassphrase : wrwUser . walletPassphrase ,
470- recoveryDestination : destinationAddress ,
471- } ,
472- openSSLBytes
473- )
455+ . recover ( {
456+ userKey : wrwUser . userPrivateKey ,
457+ bitgoKey : wrwUser . bitgoPublicKey ,
458+ walletPassphrase : wrwUser . walletPassphrase ,
459+ recoveryDestination : destinationAddress ,
460+ } )
474461 . should . rejectedWith ( 'missing backupKey' ) ;
475462 } ) ;
476463
477464 it ( 'should throw error if userkey is not present' , async function ( ) {
478465 await basecoin
479- . recover (
480- {
481- backupKey : wrwUser . backupPrivateKey ,
482- bitgoKey : wrwUser . bitgoPublicKey ,
483- walletPassphrase : wrwUser . walletPassphrase ,
484- recoveryDestination : destinationAddress ,
485- } ,
486- openSSLBytes
487- )
466+ . recover ( {
467+ backupKey : wrwUser . backupPrivateKey ,
468+ bitgoKey : wrwUser . bitgoPublicKey ,
469+ walletPassphrase : wrwUser . walletPassphrase ,
470+ recoveryDestination : destinationAddress ,
471+ } )
488472 . should . rejectedWith ( 'missing userKey' ) ;
489473 } ) ;
490474
491475 it ( 'should throw error if wallet passphrase is not present' , async function ( ) {
492476 await basecoin
493- . recover (
494- {
495- userKey : wrwUser . userPrivateKey ,
496- backupKey : wrwUser . backupPrivateKey ,
497- bitgoKey : wrwUser . bitgoPublicKey ,
498- recoveryDestination : destinationAddress ,
499- } ,
500- openSSLBytes
501- )
477+ . recover ( {
478+ userKey : wrwUser . userPrivateKey ,
479+ backupKey : wrwUser . backupPrivateKey ,
480+ bitgoKey : wrwUser . bitgoPublicKey ,
481+ recoveryDestination : destinationAddress ,
482+ } )
502483 . should . rejectedWith ( 'missing wallet passphrase' ) ;
503484 } ) ;
504485
505486 it ( 'should throw error if there is no balance' , async function ( ) {
506487 await basecoin
507- . recover (
508- {
509- userKey : wrwUser . userPrivateKey ,
510- backupKey : wrwUser . backupPrivateKey ,
511- bitgoKey : wrwUser . bitgoPublicKey ,
512- walletPassphrase : wrwUser . walletPassphrase ,
513- recoveryDestination : destinationAddress ,
514- } ,
515- openSSLBytes
516- )
488+ . recover ( {
489+ userKey : wrwUser . userPrivateKey ,
490+ backupKey : wrwUser . backupPrivateKey ,
491+ bitgoKey : wrwUser . bitgoPublicKey ,
492+ walletPassphrase : wrwUser . walletPassphrase ,
493+ recoveryDestination : destinationAddress ,
494+ } )
517495 . should . rejectedWith ( 'Did not have enough funds to recover' ) ;
518496 } ) ;
519497 } ) ;
0 commit comments