File tree Expand file tree Collapse file tree 3 files changed +998
-1061
lines changed Expand file tree Collapse file tree 3 files changed +998
-1061
lines changed Original file line number Diff line number Diff line change 2828 "@blockworks-foundation/voter-stake-registry-client" : " ^0.2.0" ,
2929 "@emotion/react" : " ^11.1.5" ,
3030 "@emotion/styled" : " ^11.3.0" ,
31- "@friktion-labs/friktion-sdk" : " 1 .1.113 " ,
31+ "@friktion-labs/friktion-sdk" : " 2 .1.19 " ,
3232 "@headlessui/react" : " ^1.4.2" ,
3333 "@heroicons/react" : " ^1.0.1" ,
3434 "@marinade.finance/marinade-ts-sdk" : " ^2.0.9" ,
Original file line number Diff line number Diff line change 11import {
2- ConnectedVoltSDK ,
32 FriktionSDK ,
43 FriktionSnapshot ,
4+ toConnectedSDK ,
55 VoltSnapshot ,
66} from '@friktion-labs/friktion-sdk' ;
77import { Wallet } from '@project-serum/sol-wallet-adapter' ;
@@ -57,10 +57,10 @@ export const buildVoltSDK = async ({
5757 } ,
5858 } ) ;
5959
60- return new ConnectedVoltSDK (
60+ return toConnectedSDK (
61+ await sdk . loadVoltSDKWithExtraDataByKey ( new PublicKey ( voltVaultId ) ) ,
6162 connection ,
6263 wallet . publicKey ,
63- await sdk . loadVoltAndExtraDataByKey ( new PublicKey ( voltVaultId ) ) ,
6464 governancePubkey ,
6565 ) ;
6666} ;
@@ -116,7 +116,13 @@ const fetchVoltRound = async ({
116116 } ) ;
117117 const balances = await cVoltSDK . getBalancesForUser ( governancePubkey ) ;
118118 const epochInfo = await cVoltSDK . getCurrentEpochInfo ( ) ;
119-
119+ console . log ( 'data' , {
120+ pendingDeposit : balances ?. pendingDeposits . toString ( ) ?? '0' ,
121+ pendingWithdrawal : balances ?. pendingWithdrawals . toString ( ) ?? '0' ,
122+ deposited : balances ?. totalBalance . toString ( ) ?? '0' ,
123+ claimable : balances ?. claimableUnderlying . toString ( ) ?? '0' ,
124+ tokenPrice : ( epochInfo . vaultTokenPrice as string ) ?? '0' ,
125+ } ) ;
120126 return {
121127 pendingDeposit : balances ?. pendingDeposits . toString ( ) ?? '0' ,
122128 pendingWithdrawal : balances ?. pendingWithdrawals . toString ( ) ?? '0' ,
You can’t perform that action at this time.
0 commit comments