Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
lednhatkhanh committed Sep 21, 2024
1 parent 75ec02f commit 6edbbf4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export class BlockfrostAdapter implements Adapter {
}: GetPoolInTxParams): Promise<PoolV1.State | null> {
const poolTx = await this.blockFrostApi.txsUtxos(txHash);
const poolUtxo = poolTx.outputs.find(
(o) =>
(o: typeof poolTx.outputs[number]) =>
getScriptHashFromAddress(o.address) === DexV1Constant.POOL_SCRIPT_HASH
);
if (!poolUtxo) {
Expand Down Expand Up @@ -222,10 +222,10 @@ export class BlockfrostAdapter implements Adapter {
{ count, order, page }
);
return utxos
.filter((utxo) =>
.filter((utxo: typeof utxos[number]) =>
isValidPoolOutput(utxo.address, utxo.amount, utxo.data_hash)
)
.map((utxo) => {
.map((utxo: typeof utxos[number]) => {
invariant(
utxo.data_hash,
`expect pool to have datum hash, got ${utxo.data_hash}`
Expand Down Expand Up @@ -254,7 +254,7 @@ export class BlockfrostAdapter implements Adapter {
});
console.log(JSONBig.stringify(nftTxs));
return nftTxs.map(
(tx): TxHistory => ({
(tx: typeof nftTxs[number]): TxHistory => ({
txHash: tx.tx_hash,
txIndex: tx.tx_index,
blockHeight: tx.block_height,
Expand Down
2 changes: 1 addition & 1 deletion src/calculate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ export namespace StableswapCalculation {
const d0 = getDMem(tempDatumBalances, multiples, amp);
const d1 = getDMem(newDatBalancesWithoutFee, multiples, amp);

const newDatBalancesWithTradingFee = [];
const newDatBalancesWithTradingFee: bigint[] = [];
for (let i = 0; i < length; ++i) {
const idealBalance = (d1 * tempDatumBalances[i]) / d0;
let different = 0n;
Expand Down
1 change: 1 addition & 0 deletions src/syncer/postgres/prisma/schema.prisma
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
generator client {
provider = "prisma-client-js"
output = "../../../../node_modules/.prisma/client"
}

datasource db {
Expand Down

0 comments on commit 6edbbf4

Please sign in to comment.