@triadxyz/triad-protocol 2.8.0-beta → 2.8.2-beta
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/dist/index.js +3 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -868,7 +868,7 @@ class TriadProtocolClient {
|
|
|
868
868
|
let totalUSDCNeeded = new bn_js_1.default(0);
|
|
869
869
|
let tempRemainingUSDC = remainingUSDC.clone();
|
|
870
870
|
for (const order of sortedOrders) {
|
|
871
|
-
if (tempRemainingUSDC.lt(new bn_js_1.default(
|
|
871
|
+
if (tempRemainingUSDC.lt(new bn_js_1.default(1000000)))
|
|
872
872
|
break;
|
|
873
873
|
if (order.authority === this.program.provider.publicKey.toBase58()) {
|
|
874
874
|
continue;
|
|
@@ -900,6 +900,7 @@ class TriadProtocolClient {
|
|
|
900
900
|
totalUSDCNeeded = totalUSDCNeeded.add(usdcAmount);
|
|
901
901
|
tempRemainingUSDC = tempRemainingUSDC.sub(usdcAmount);
|
|
902
902
|
}
|
|
903
|
+
console.log('totalUSDCNeeded', totalUSDCNeeded.toNumber());
|
|
903
904
|
if (isTrdPayout && totalUSDCNeeded.gt(new bn_js_1.default(0))) {
|
|
904
905
|
const { swapIxs, addressLookupTableAccounts: swapAddressLookupTableAccounts, outAmount, setupInstructions } = yield (0, swap_1.swap)({
|
|
905
906
|
connection: this.program.provider.connection,
|
|
@@ -917,7 +918,7 @@ class TriadProtocolClient {
|
|
|
917
918
|
addressLookupTableAccounts.push(...swapAddressLookupTableAccounts);
|
|
918
919
|
}
|
|
919
920
|
for (const order of sortedOrders) {
|
|
920
|
-
if (remainingUSDC.lt(new bn_js_1.default(
|
|
921
|
+
if (remainingUSDC.lt(new bn_js_1.default(1000000)))
|
|
921
922
|
break;
|
|
922
923
|
if (order.authority === this.program.provider.publicKey.toBase58()) {
|
|
923
924
|
continue;
|