@@ -43,6 +43,18 @@ import {
4343// RewardsDistributorInteractor for reward claiming
4444import { RewardsDistributorInteractor } from '@firefly-exchange/library-sui/index' ;
4545import { toHex } from '@mysten/bcs' ;
46+ import globalAxios from 'axios' ;
47+
48+ // Enable HTTP/2 in Node.js environments for better performance
49+ // Only enable for Node.js specifically (not Bun, Deno, or browsers)
50+ // Axios HTTP/2 support is toggled via httpVersion in the http adapter
51+ if (
52+ typeof process !== 'undefined' &&
53+ process . versions &&
54+ process . versions . node
55+ ) {
56+ globalAxios . defaults . httpVersion = 2 ;
57+ }
4658
4759interface EnvironmentConfig {
4860 [ key : string ] : {
@@ -492,8 +504,7 @@ export class BluefinProSdk {
492504
493505 // Throw the error to let the caller handle it
494506 throw new Error (
495- `Token refresh failed: ${
496- e instanceof Error ? e . message : 'Unknown error'
507+ `Token refresh failed: ${ e instanceof Error ? e . message : 'Unknown error'
497508 } `,
498509 ) ;
499510 }
@@ -797,8 +808,8 @@ export class BluefinProSdk {
797808 this . txBuilder ?. depositToAssetBank (
798809 assetSymbol ,
799810 accountAddress ||
800- this . currentAccountAddress ||
801- this . bfSigner . getAddress ( ) ,
811+ this . currentAccountAddress ||
812+ this . bfSigner . getAddress ( ) ,
802813 amountE9 ,
803814 splitCoin ,
804815 {
0 commit comments