From c97afe87c804c57c52692ca14aa928ef9b44a9be Mon Sep 17 00:00:00 2001 From: crispheaney Date: Mon, 27 Nov 2023 22:11:45 +0000 Subject: [PATCH] deploy: 1f3b1e7ea72e41d187c7c295cb1230f8ca4f8b0e --- index.html | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 4daba86..e89e243 100644 --- a/index.html +++ b/index.html @@ -921,8 +921,8 @@

Withdrawing

associatedTokenAccount,
 );
 

-spot_market_index = 0 # USDC
-amount = drift_client.convert_to_spot_precision(spot_market_index, 100) # $100
+market_index = 0 # USDC
+amount = drift_client.convert_to_spot_precision(market_index, 100) # $100
 
 tx_sig = await drift_client.withdraw(amount, spot_market_index)
 
@@ -972,6 +972,17 @@

Transferring Deposits

fromSubAccountId, toSubAccountId, ); +
market_index = 0
+amount = drift_client.convert_to_spot_precision(market_ndex, 100)
+from_sub_account_id = 0
+to_sub_account_id = 0
+
+await drift_client.transfer_deposit(
+  amount,
+  market_index,
+  from_sub_account_id,
+  to_sub_account_id,
+)
 
@@ -1644,6 +1655,13 @@

Settle Perp PNL

user.getUserAccount(),
    marketIndex
 );
+
market_index = 0
+user =  drift_client.get_user()
+await drift_client.settle_pnl(
+   user.user_public_key,
+   user.get_user_account(),
+   market_index
+)