@interest-protocol/vortex-sdk 8.4.0 → 9.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@interest-protocol/vortex-sdk",
3
- "version": "8.4.0",
3
+ "version": "9.0.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "module": "./dist/index.mjs",
package/src/constants.ts CHANGED
@@ -93,7 +93,7 @@ export const LSK_FETCH_OFFSET = 'fetch_offset';
93
93
 
94
94
  export const LSK_ENCRYPTED_OUTPUTS = 'encrypted_outputs';
95
95
 
96
- export const VORTEX_SIGNATURE_DOMAIN = 'https://kage.money/'.toUpperCase();
96
+ export const VORTEX_SIGNATURE_DOMAIN = 'https://vortexfi.xyz/'.toUpperCase();
97
97
 
98
98
  export const TREASURY_ADDRESS =
99
99
  '0x894261575b948c035d002adc3ca4d73c683c01a1bfafac183870940bf9afef1a';
package/src/deposit.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Transaction } from '@mysten/sui/transactions';
1
+ import { Transaction, coinWithBalance } from '@mysten/sui/transactions';
2
2
  import invariant from 'tiny-invariant';
3
3
  import { BN254_FIELD_MODULUS } from './constants';
4
4
  import { DepositArgs } from './vortex.types';
@@ -26,7 +26,7 @@ export const deposit = async ({
26
26
 
27
27
  const {
28
28
  extData,
29
- tx: tx3,
29
+ tx: tx2,
30
30
  moveProof,
31
31
  } = await prepareDepositProof({
32
32
  tx,
@@ -41,13 +41,18 @@ export const deposit = async ({
41
41
  relayerFee,
42
42
  });
43
43
 
44
- const suiCoinDeposit = tx3.splitCoins(tx3.gas, [tx3.pure.u64(amount)]);
44
+ const vortexPoolObject = await vortexSdk.resolveVortexPool(vortexPool);
45
+
46
+ const deposit = coinWithBalance({
47
+ balance: amount,
48
+ type: vortexPoolObject.coinType,
49
+ })(tx2);
45
50
 
46
51
  return vortexSdk.transact({
47
52
  vortexPool,
48
- tx: tx3,
53
+ tx: tx2,
49
54
  proof: moveProof,
50
55
  extData: extData,
51
- deposit: suiCoinDeposit,
56
+ deposit,
52
57
  });
53
58
  };