fix: Correct BN import for withdrawal system
Changed from '@project-serum/anchor' to 'bn.js' to match other Drift SDK integrations. Fixes 'Cannot read properties of undefined (reading '_bn')' error. User can now test withdrawal with $5 minimum.
This commit is contained in:
7
.env
7
.env
@@ -413,3 +413,10 @@ USE_PERCENTAGE_SIZE=false
|
|||||||
|
|
||||||
BREAKEVEN_TRIGGER_PERCENT=0.4
|
BREAKEVEN_TRIGGER_PERCENT=0.4
|
||||||
ATR_MULTIPLIER_FOR_TP2=2
|
ATR_MULTIPLIER_FOR_TP2=2
|
||||||
|
ENABLE_AUTO_WITHDRAWALS=false
|
||||||
|
WITHDRAWAL_INTERVAL_HOURS=168
|
||||||
|
WITHDRAWAL_PROFIT_PERCENT=10
|
||||||
|
MIN_WITHDRAWAL_AMOUNT=5
|
||||||
|
MIN_ACCOUNT_BALANCE=500
|
||||||
|
LAST_WITHDRAWAL_TIME=
|
||||||
|
TOTAL_WITHDRAWN=0
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
* Handles actual withdrawal from Drift Protocol to wallet
|
* Handles actual withdrawal from Drift Protocol to wallet
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { BN } from '@project-serum/anchor'
|
import BN from 'bn.js'
|
||||||
import { PublicKey } from '@solana/web3.js'
|
import { PublicKey } from '@solana/web3.js'
|
||||||
import { initializeDriftService } from './client'
|
import { initializeDriftService } from './client'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user