Skip to content

Commit ba823c1

Browse files
committed
feat: implement bitcoin onchain allocator
1 parent bb96d47 commit ba823c1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/services/request-handler/index.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import {
3333
getOnchainAllocatorForChain,
3434
getChain,
3535
Chain,
36+
getChains,
3637
} from "../../common/chains";
3738
import { db } from "../../common/db";
3839
import { externalError } from "../../common/error";
@@ -1063,7 +1064,12 @@ export class RequestHandlerService {
10631064
callbackGas: 20_000_000_000_000n,
10641065
};
10651066

1066-
const chain = await getChain(payloadParams.chainId);
1067+
const chain = await getChains().then(
1068+
(chains) =>
1069+
Object.values(chains).find(
1070+
(c) => c.metadata.allocatorChainId === payloadParams.chainId,
1071+
)!,
1072+
);
10671073
if (chain.vmType === "bitcoin-vm") {
10681074
const decodedData = decodeAbiParameters(
10691075
[

0 commit comments

Comments
 (0)