Skip to content

Commit bf5859b

Browse files
authored
updated implementation to get chain Info using chainOverrides (#297)
* updated implementation to get chainData using chainOverrides * updated getLocalWallet() to support chainOverride & updated the type
1 parent 9d878d1 commit bf5859b

File tree

137 files changed

+210
-141
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+210
-141
lines changed

src/server/routes/backend-wallet/getBalance.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export async function getBalance(fastify: FastifyInstance) {
5151
},
5252
handler: async (request, reply) => {
5353
const { chain, walletAddress } = request.params;
54-
const chainId = getChainIdFromChain(chain);
54+
const chainId = await getChainIdFromChain(chain);
5555
const sdk = await getSdk({ chainId });
5656

5757
let balanceData = await sdk.getBalance(walletAddress);

src/server/routes/backend-wallet/send.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export async function sendTransaction(fastify: FastifyInstance) {
6060
const { chain } = request.params;
6161
const { toAddress, data, value } = request.body;
6262
const fromAddress = request.headers["x-backend-wallet-address"] as string;
63-
const chainId = getChainIdFromChain(chain);
63+
const chainId = await getChainIdFromChain(chain);
6464

6565
// TODO: At some point we should simulate this first
6666
// For now, it's okay not to since its a raw transaction

src/server/routes/backend-wallet/transfer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export async function transfer(fastify: FastifyInstance) {
6666
// TODO: Bring Smart Wallet back
6767
// const accountAddress = request.headers["x-account-address"] as string;
6868

69-
const chainId = getChainIdFromChain(chain);
69+
const chainId = await getChainIdFromChain(chain);
7070
const sdk = await getSdk({ chainId, walletAddress });
7171

7272
const normalizedValue = await normalizePriceValue(

src/server/routes/contract/events/getAllEvents.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export async function getAllEvents(fastify: FastifyInstance) {
8181
const { chain, contractAddress } = request.params;
8282
const { fromBlock, toBlock, order } = request.query;
8383

84-
const chainId = getChainIdFromChain(chain);
84+
const chainId = await getChainIdFromChain(chain);
8585
const contract = await getContract({
8686
chainId,
8787
contractAddress,

src/server/routes/contract/events/getEvents.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export async function getEvents(fastify: FastifyInstance) {
8686
const { chain, contractAddress } = request.params;
8787
const { fromBlock, toBlock, order, eventName, filters } = request.body;
8888

89-
const chainId = getChainIdFromChain(chain);
89+
const chainId = await getChainIdFromChain(chain);
9090
const contract = await getContract({
9191
chainId,
9292
contractAddress,

src/server/routes/contract/extensions/account/read/getAllAdmins.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const getAllAdmins = async (fastify: FastifyInstance) => {
3434
},
3535
handler: async (request, reply) => {
3636
const { chain, contractAddress } = request.params;
37-
const chainId = getChainIdFromChain(chain);
37+
const chainId = await getChainIdFromChain(chain);
3838

3939
const contract = await getContract({
4040
chainId,

src/server/routes/contract/extensions/account/read/getAllSessions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const getAllSessions = async (fastify: FastifyInstance) => {
3333
},
3434
handler: async (request, reply) => {
3535
const { chain, contractAddress } = request.params;
36-
const chainId = getChainIdFromChain(chain);
36+
const chainId = await getChainIdFromChain(chain);
3737

3838
const contract = await getContract({
3939
chainId,

src/server/routes/contract/extensions/account/write/grantAdmin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const grantAdmin = async (fastify: FastifyInstance) => {
5151
"x-backend-wallet-address"
5252
] as string;
5353
const accountAddress = request.headers["x-account-address"] as string;
54-
const chainId = getChainIdFromChain(chain);
54+
const chainId = await getChainIdFromChain(chain);
5555

5656
const contract = await getContract({
5757
chainId,

src/server/routes/contract/extensions/account/write/grantSession.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export const grantSession = async (fastify: FastifyInstance) => {
5252
"x-backend-wallet-address"
5353
] as string;
5454
const accountAddress = request.headers["x-account-address"] as string;
55-
const chainId = getChainIdFromChain(chain);
55+
const chainId = await getChainIdFromChain(chain);
5656

5757
const contract = await getContract({
5858
chainId,

src/server/routes/contract/extensions/account/write/revokeAdmin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const revokeAdmin = async (fastify: FastifyInstance) => {
5151
"x-backend-wallet-address"
5252
] as string;
5353
const accountAddress = request.headers["x-account-address"] as string;
54-
const chainId = getChainIdFromChain(chain);
54+
const chainId = await getChainIdFromChain(chain);
5555

5656
const contract = await getContract({
5757
chainId,

src/server/routes/contract/extensions/account/write/revokeSession.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const revokeSession = async (fastify: FastifyInstance) => {
5151
"x-backend-wallet-address"
5252
] as string;
5353
const accountAddress = request.headers["x-account-address"] as string;
54-
const chainId = getChainIdFromChain(chain);
54+
const chainId = await getChainIdFromChain(chain);
5555

5656
const contract = await getContract({
5757
chainId,

src/server/routes/contract/extensions/account/write/updateSession.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const updateSession = async (fastify: FastifyInstance) => {
5454
"x-backend-wallet-address"
5555
] as string;
5656
const accountAddress = request.headers["x-account-address"] as string;
57-
const chainId = getChainIdFromChain(chain);
57+
const chainId = await getChainIdFromChain(chain);
5858

5959
const contract = await getContract({
6060
chainId,

src/server/routes/contract/extensions/accountFactory/read/getAllAccounts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const getAllAccounts = async (fastify: FastifyInstance) => {
3434
},
3535
handler: async (request, reply) => {
3636
const { chain, contractAddress } = request.params;
37-
const chainId = getChainIdFromChain(chain);
37+
const chainId = await getChainIdFromChain(chain);
3838

3939
const contract = await getContract({
4040
chainId,

src/server/routes/contract/extensions/accountFactory/read/getAssociatedAccounts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export const getAssociatedAccounts = async (fastify: FastifyInstance) => {
4545
handler: async (request, reply) => {
4646
const { chain, contractAddress } = request.params;
4747
const { signerAddress } = request.query;
48-
const chainId = getChainIdFromChain(chain);
48+
const chainId = await getChainIdFromChain(chain);
4949

5050
const contract = await getContract({
5151
chainId,

src/server/routes/contract/extensions/accountFactory/read/isAccountDeployed.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export const isAccountDeployed = async (fastify: FastifyInstance) => {
5050
handler: async (request, reply) => {
5151
const { chain, contractAddress } = request.params;
5252
const { adminAddress, extraData } = request.query;
53-
const chainId = getChainIdFromChain(chain);
53+
const chainId = await getChainIdFromChain(chain);
5454

5555
const contract = await getContract({
5656
chainId,

src/server/routes/contract/extensions/accountFactory/read/predictAccountAddress.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export const predictAccountAddress = async (fastify: FastifyInstance) => {
4848
handler: async (request, reply) => {
4949
const { chain, contractAddress } = request.params;
5050
const { adminAddress, extraData } = request.query;
51-
const chainId = getChainIdFromChain(chain);
51+
const chainId = await getChainIdFromChain(chain);
5252

5353
const contract = await getContract({
5454
chainId,

src/server/routes/contract/extensions/accountFactory/write/createAccount.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export const createAccount = async (fastify: FastifyInstance) => {
5656
"x-backend-wallet-address"
5757
] as string;
5858
const accountAddress = request.headers["x-account-address"] as string;
59-
const chainId = getChainIdFromChain(chain);
59+
const chainId = await getChainIdFromChain(chain);
6060

6161
const contract = await getContract({
6262
chainId,

src/server/routes/contract/extensions/erc1155/read/balanceOf.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export async function erc1155BalanceOf(fastify: FastifyInstance) {
5858
handler: async (request, reply) => {
5959
const { chain, contractAddress } = request.params;
6060
const { walletAddress, tokenId } = request.query;
61-
const chainId = getChainIdFromChain(chain);
61+
const chainId = await getChainIdFromChain(chain);
6262
const contract = await getContract({
6363
chainId,
6464
contractAddress,

src/server/routes/contract/extensions/erc1155/read/get.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export async function erc1155Get(fastify: FastifyInstance) {
6767
handler: async (request, reply) => {
6868
const { chain, contractAddress } = request.params;
6969
const { tokenId } = request.query;
70-
const chainId = getChainIdFromChain(chain);
70+
const chainId = await getChainIdFromChain(chain);
7171
const contract = await getContract({
7272
chainId,
7373
contractAddress,

src/server/routes/contract/extensions/erc1155/read/getAll.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export async function erc1155GetAll(fastify: FastifyInstance) {
7676
handler: async (request, reply) => {
7777
const { chain, contractAddress } = request.params;
7878
const { start, count } = request.query;
79-
const chainId = getChainIdFromChain(chain);
79+
const chainId = await getChainIdFromChain(chain);
8080
const contract = await getContract({
8181
chainId,
8282
contractAddress,

src/server/routes/contract/extensions/erc1155/read/getOwned.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export async function erc1155GetOwned(fastify: FastifyInstance) {
7575
handler: async (request, reply) => {
7676
const { chain, contractAddress } = request.params;
7777
const { walletAddress } = request.query;
78-
const chainId = getChainIdFromChain(chain);
78+
const chainId = await getChainIdFromChain(chain);
7979
const contract = await getContract({
8080
chainId,
8181
contractAddress,

src/server/routes/contract/extensions/erc1155/read/isApproved.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export async function erc1155IsApproved(fastify: FastifyInstance) {
5858
handler: async (request, reply) => {
5959
const { chain, contractAddress } = request.params;
6060
const { ownerWallet, operator } = request.query;
61-
const chainId = getChainIdFromChain(chain);
61+
const chainId = await getChainIdFromChain(chain);
6262
const contract = await getContract({
6363
chainId,
6464
contractAddress,

src/server/routes/contract/extensions/erc1155/read/signatureGenerate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export async function erc1155SignatureGenerate(fastify: FastifyInstance) {
6767
royaltyRecipient,
6868
uid,
6969
} = request.body;
70-
const chainId = getChainIdFromChain(chain);
70+
const chainId = await getChainIdFromChain(chain);
7171
const contract = await getContract({
7272
chainId,
7373
contractAddress,

src/server/routes/contract/extensions/erc1155/read/totalCount.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export async function erc1155TotalCount(fastify: FastifyInstance) {
4242
},
4343
handler: async (request, reply) => {
4444
const { chain, contractAddress } = request.params;
45-
const chainId = getChainIdFromChain(chain);
45+
const chainId = await getChainIdFromChain(chain);
4646
const contract = await getContract({
4747
chainId,
4848
contractAddress,

src/server/routes/contract/extensions/erc1155/read/totalSupply.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export async function erc1155TotalSupply(fastify: FastifyInstance) {
5353
handler: async (request, reply) => {
5454
const { chain, contractAddress } = request.params;
5555
const { tokenId } = request.query;
56-
const chainId = getChainIdFromChain(chain);
56+
const chainId = await getChainIdFromChain(chain);
5757
const contract = await getContract({
5858
chainId,
5959
contractAddress,

src/server/routes/contract/extensions/erc1155/write/airdrop.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export async function erc1155airdrop(fastify: FastifyInstance) {
7676
"x-backend-wallet-address"
7777
] as string;
7878
const accountAddress = request.headers["x-account-address"] as string;
79-
const chainId = getChainIdFromChain(chain);
79+
const chainId = await getChainIdFromChain(chain);
8080
const contract = await getContract({
8181
chainId,
8282
contractAddress,

src/server/routes/contract/extensions/erc1155/write/burn.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export async function erc1155burn(fastify: FastifyInstance) {
5959
"x-backend-wallet-address"
6060
] as string;
6161
const accountAddress = request.headers["x-account-address"] as string;
62-
const chainId = getChainIdFromChain(chain);
62+
const chainId = await getChainIdFromChain(chain);
6363
const contract = await getContract({
6464
chainId,
6565
contractAddress,

src/server/routes/contract/extensions/erc1155/write/burnBatch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export async function erc1155burnBatch(fastify: FastifyInstance) {
6565
"x-backend-wallet-address"
6666
] as string;
6767
const accountAddress = request.headers["x-account-address"] as string;
68-
const chainId = getChainIdFromChain(chain);
68+
const chainId = await getChainIdFromChain(chain);
6969
const contract = await getContract({
7070
chainId,
7171
contractAddress,

src/server/routes/contract/extensions/erc1155/write/claimTo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export async function erc1155claimTo(fastify: FastifyInstance) {
6363
"x-backend-wallet-address"
6464
] as string;
6565
const accountAddress = request.headers["x-account-address"] as string;
66-
const chainId = getChainIdFromChain(chain);
66+
const chainId = await getChainIdFromChain(chain);
6767
const contract = await getContract({
6868
chainId,
6969
contractAddress,

src/server/routes/contract/extensions/erc1155/write/lazyMint.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export async function erc1155lazyMint(fastify: FastifyInstance) {
6565
"x-backend-wallet-address"
6666
] as string;
6767
const accountAddress = request.headers["x-account-address"] as string;
68-
const chainId = getChainIdFromChain(chain);
68+
const chainId = await getChainIdFromChain(chain);
6969
const contract = await getContract({
7070
chainId,
7171
contractAddress,

src/server/routes/contract/extensions/erc1155/write/mintAdditionalSupplyTo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export async function erc1155mintAdditionalSupplyTo(fastify: FastifyInstance) {
6464
"x-backend-wallet-address"
6565
] as string;
6666
const accountAddress = request.headers["x-account-address"] as string;
67-
const chainId = getChainIdFromChain(chain);
67+
const chainId = await getChainIdFromChain(chain);
6868
const contract = await getContract({
6969
chainId,
7070
contractAddress,

src/server/routes/contract/extensions/erc1155/write/mintBatchTo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export async function erc1155mintBatchTo(fastify: FastifyInstance) {
8080
"x-backend-wallet-address"
8181
] as string;
8282
const accountAddress = request.headers["x-account-address"] as string;
83-
const chainId = getChainIdFromChain(chain);
83+
const chainId = await getChainIdFromChain(chain);
8484
const contract = await getContract({
8585
chainId,
8686
contractAddress,

src/server/routes/contract/extensions/erc1155/write/mintTo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export async function erc1155mintTo(fastify: FastifyInstance) {
6767
"x-backend-wallet-address"
6868
] as string;
6969
const accountAddress = request.headers["x-account-address"] as string;
70-
const chainId = getChainIdFromChain(chain);
70+
const chainId = await getChainIdFromChain(chain);
7171
const contract = await getContract({
7272
chainId,
7373
contractAddress,

src/server/routes/contract/extensions/erc1155/write/setApprovalForAll.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export async function erc1155SetApprovalForAll(fastify: FastifyInstance) {
6262
"x-backend-wallet-address"
6363
] as string;
6464
const accountAddress = request.headers["x-account-address"] as string;
65-
const chainId = getChainIdFromChain(chain);
65+
const chainId = await getChainIdFromChain(chain);
6666
const contract = await getContract({
6767
chainId,
6868
contractAddress,

src/server/routes/contract/extensions/erc1155/write/signatureMint.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export async function erc1155SignatureMint(fastify: FastifyInstance) {
5858
"x-backend-wallet-address"
5959
] as string;
6060
const accountAddress = request.headers["x-account-address"] as string;
61-
const chainId = getChainIdFromChain(chain);
61+
const chainId = await getChainIdFromChain(chain);
6262
const contract = await getContract({
6363
chainId,
6464
contractAddress,

src/server/routes/contract/extensions/erc1155/write/transfer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export async function erc1155transfer(fastify: FastifyInstance) {
6363
"x-backend-wallet-address"
6464
] as string;
6565
const accountAddress = request.headers["x-account-address"] as string;
66-
const chainId = getChainIdFromChain(chain);
66+
const chainId = await getChainIdFromChain(chain);
6767
const contract = await getContract({
6868
chainId,
6969
contractAddress,

src/server/routes/contract/extensions/erc1155/write/transferFrom.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export async function erc1155transferFrom(fastify: FastifyInstance) {
7070
"x-backend-wallet-address"
7171
] as string;
7272
const accountAddress = request.headers["x-account-address"] as string;
73-
const chainId = getChainIdFromChain(chain);
73+
const chainId = await getChainIdFromChain(chain);
7474
const contract = await getContract({
7575
chainId,
7676
contractAddress,

src/server/routes/contract/extensions/erc20/read/allowanceOf.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export async function erc20AllowanceOf(fastify: FastifyInstance) {
6363
handler: async (request, reply) => {
6464
const { chain, contractAddress } = request.params;
6565
const { spenderWallet, ownerWallet } = request.query;
66-
const chainId = getChainIdFromChain(chain);
66+
const chainId = await getChainIdFromChain(chain);
6767
const contract = await getContract({
6868
chainId,
6969
contractAddress,

src/server/routes/contract/extensions/erc20/read/balanceOf.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export async function erc20BalanceOf(fastify: FastifyInstance) {
6161
handler: async (request, reply) => {
6262
const { chain, contractAddress } = request.params;
6363
const { wallet_address } = request.query;
64-
const chainId = getChainIdFromChain(chain);
64+
const chainId = await getChainIdFromChain(chain);
6565
const contract = await getContract({
6666
chainId,
6767
contractAddress,

src/server/routes/contract/extensions/erc20/read/get.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export async function erc20GetMetadata(fastify: FastifyInstance) {
4949
},
5050
handler: async (request, reply) => {
5151
const { chain, contractAddress } = request.params;
52-
const chainId = getChainIdFromChain(chain);
52+
const chainId = await getChainIdFromChain(chain);
5353
const contract = await getContract({
5454
chainId,
5555
contractAddress,

src/server/routes/contract/extensions/erc20/read/signatureGenerate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export async function erc20SignatureGenerate(fastify: FastifyInstance) {
6767
const walletAddress = request.headers[
6868
"x-backend-wallet-address"
6969
] as string;
70-
const chainId = getChainIdFromChain(chain);
70+
const chainId = await getChainIdFromChain(chain);
7171
const contract = await getContract({
7272
chainId,
7373
contractAddress,

src/server/routes/contract/extensions/erc20/read/totalSupply.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export async function erc20TotalSupply(fastify: FastifyInstance) {
5151
},
5252
handler: async (request, reply) => {
5353
const { chain, contractAddress } = request.params;
54-
const chainId = getChainIdFromChain(chain);
54+
const chainId = await getChainIdFromChain(chain);
5555
const contract = await getContract({
5656
chainId,
5757
contractAddress,

src/server/routes/contract/extensions/erc20/write/burn.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export async function erc20burn(fastify: FastifyInstance) {
5656
"x-backend-wallet-address"
5757
] as string;
5858
const accountAddress = request.headers["x-account-address"] as string;
59-
const chainId = getChainIdFromChain(chain);
59+
const chainId = await getChainIdFromChain(chain);
6060
const contract = await getContract({
6161
chainId,
6262
contractAddress,

src/server/routes/contract/extensions/erc20/write/burnFrom.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export async function erc20burnFrom(fastify: FastifyInstance) {
6161
"x-backend-wallet-address"
6262
] as string;
6363
const accountAddress = request.headers["x-account-address"] as string;
64-
const chainId = getChainIdFromChain(chain);
64+
const chainId = await getChainIdFromChain(chain);
6565
const contract = await getContract({
6666
chainId,
6767
contractAddress,

0 commit comments

Comments
 (0)