Merge branch 'main' into repay-partially

This commit is contained in:
Bartosz Lipinski 2021-01-27 16:43:55 -06:00 committed by GitHub
commit ddf0608859
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -125,7 +125,7 @@ export const borrow = async (
signers signers
) )
: undefined; : undefined;
let amountLamports: number = 0; let amountLamports: number = 0;
let fromLamports: number = 0; let fromLamports: number = 0;
if (amountType === BorrowAmountType.LiquidityBorrowAmount) { if (amountType === BorrowAmountType.LiquidityBorrowAmount) {
@ -152,6 +152,7 @@ export const borrow = async (
fromLamports = amountLamports; fromLamports = amountLamports;
} }
const fromAccount = ensureSplAccount( const fromAccount = ensureSplAccount(
instructions, instructions,
finalCleanupInstructions, finalCleanupInstructions,
@ -201,7 +202,7 @@ export const borrow = async (
fromAccount, fromAccount,
wallet.publicKey, wallet.publicKey,
fromLamports, fromLamports,
false false,
); );
signers.push(transferAuthority); signers.push(transferAuthority);