hedge-web3 0.1.35 → 0.1.36
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.
@@ -15,7 +15,6 @@ const spl_token_1 = require("@solana/spl-token");
|
|
15
15
|
const web3_js_1 = require("@solana/web3.js");
|
16
16
|
const getLinkedListAccounts_1 = require("../utils/getLinkedListAccounts");
|
17
17
|
const Constants_1 = require("../Constants");
|
18
|
-
const Errors_1 = require("utils/Errors");
|
19
18
|
function loanVault(program, provider, payer, vaultPublicKey, loanAmount, overrideTime) {
|
20
19
|
return __awaiter(this, void 0, void 0, function* () {
|
21
20
|
const ushMintPublickey = yield (0, Constants_1.getUshMintPublicKey)();
|
@@ -28,7 +27,7 @@ function loanVault(program, provider, payer, vaultPublicKey, loanAmount, overrid
|
|
28
27
|
const [oldSmallerPublicKey, newSmallerPublicKey, newLargerPublicKey] = yield (0, getLinkedListAccounts_1.getLinkedListAccounts)(program, provider, vaultTypeAccountPublicKey, vaultPublicKey, 0, loanAmount, false, false);
|
29
28
|
const history = web3_js_1.Keypair.generate();
|
30
29
|
const transaction = new web3_js_1.Transaction().add(yield loanVaultInstruction(program, payer.publicKey, payerUshAccount.address, vaultPublicKey, vaultAssociatedTokenAccount.address, history.publicKey, vaultTypeAccountPublicKey, vaultTypeAssociatedTokenAccount.address, oldSmallerPublicKey, newSmallerPublicKey, newLargerPublicKey, loanAmount, overrideTime));
|
31
|
-
yield (0, web3_js_1.sendAndConfirmTransaction)(provider.connection, transaction, [payer, history])
|
30
|
+
yield (0, web3_js_1.sendAndConfirmTransaction)(provider.connection, transaction, [payer, history]);
|
32
31
|
return vaultPublicKey;
|
33
32
|
});
|
34
33
|
}
|
package/package.json
CHANGED
@@ -19,7 +19,6 @@ import {
|
|
19
19
|
getVaultSystemStatePublicKey,
|
20
20
|
} from '../Constants'
|
21
21
|
import { Vault } from 'idl/vault'
|
22
|
-
import { parseAnchorErrors } from 'utils/Errors'
|
23
22
|
|
24
23
|
export async function loanVault(
|
25
24
|
program: Program<Vault>,
|
@@ -85,7 +84,7 @@ export async function loanVault(
|
|
85
84
|
overrideTime
|
86
85
|
)
|
87
86
|
)
|
88
|
-
await sendAndConfirmTransaction(provider.connection, transaction, [payer, history])
|
87
|
+
await sendAndConfirmTransaction(provider.connection, transaction, [payer, history])
|
89
88
|
return vaultPublicKey
|
90
89
|
}
|
91
90
|
|