@@ -2786,12 +2786,26 @@ export class Client {
27862786 }
27872787 }
27882788
2789- public depositToTradingContract ( quantity : CurrencyAmount , feeLevel : 'low' | 'medium' | 'high' = 'medium' ) {
2790- return this . transferToTradingContract ( quantity , MovementTypeDeposit , feeLevel )
2789+ public depositToTradingContract (
2790+ quantity : CurrencyAmount ,
2791+ feeLevel : 'low' | 'medium' | 'high' = 'medium'
2792+ ) {
2793+ return this . transferToTradingContract (
2794+ quantity ,
2795+ MovementTypeDeposit ,
2796+ feeLevel
2797+ )
27912798 }
27922799
2793- public withdrawFromTradingContract ( quantity : CurrencyAmount , feeLevel : 'low' | 'medium' | 'high' = 'medium' ) {
2794- return this . transferToTradingContract ( quantity , MovementTypeWithdrawal , feeLevel )
2800+ public withdrawFromTradingContract (
2801+ quantity : CurrencyAmount ,
2802+ feeLevel : 'low' | 'medium' | 'high' = 'medium'
2803+ ) {
2804+ return this . transferToTradingContract (
2805+ quantity ,
2806+ MovementTypeWithdrawal ,
2807+ feeLevel
2808+ )
27952809 }
27962810
27972811 private async prepareMovement (
@@ -2823,8 +2837,11 @@ export class Client {
28232837 feeLevel : 'low' | 'medium' | 'high' = 'medium'
28242838 ) : Promievent < { txId : string ; movementId : string } > {
28252839 const promise = new Promievent ( ( resolve , reject ) =>
2826- this . _transferToTradingContract ( quantity , movementType , feeLevel , ( ...args ) =>
2827- promise . emit ( ...args )
2840+ this . _transferToTradingContract (
2841+ quantity ,
2842+ movementType ,
2843+ feeLevel ,
2844+ ( ...args ) => promise . emit ( ...args )
28282845 )
28292846 . then ( resolve )
28302847 . catch ( reject )
@@ -2856,12 +2873,12 @@ export class Client {
28562873 try {
28572874 const childKey = this . apiKey . child_keys [
28582875 BLOCKCHAIN_TO_BIP44 [ blockchain . toUpperCase ( ) as Blockchain ]
2859- ]
2876+ ]
28602877 address = childKey . address
2861- } catch ( e ) {
2878+ } catch ( e ) {
28622879 address = this . nashCoreConfig . wallets [ blockchain ] . address
28632880 }
2864-
2881+
28652882 const blockchainFees = await this . getBlockchainFees (
28662883 blockchain . toUpperCase ( ) as Blockchain
28672884 )
@@ -2872,10 +2889,10 @@ export class Client {
28722889 switch ( feeLevel ) {
28732890 case 'low' :
28742891 gasPrice = blockchainFees . priceLow
2875- break ;
2892+ break
28762893 case 'high' :
28772894 gasPrice = blockchainFees . priceHigh
2878- break ;
2895+ break
28792896 }
28802897
28812898 let preparedMovement : PrepareMovementData [ 'prepareMovement' ]
0 commit comments