Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
shunjizhan committed Oct 22, 2024
1 parent 41dd570 commit 0e8fa39
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 34 deletions.
30 changes: 0 additions & 30 deletions src/api/dropAndBootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export const shouldRouteDropAndBoostrap = async (params: DropAndBootstrapParams)
try {
const { factory, feeAddr, relayerAddr } = await prepareDropAndBoostrap();

console.log({ gasDrop: params.gasDrop });
const dropFee = params.gasDrop ? DROP_SWAP_AMOUNT_JITOSOL : 0;
const dropAmountAca = params.gasDrop ? DROP_AMOUNT_ACA : 0;
const otherContributionToken = params.feeToken === 'jitosol' ? LDOT : JITOSOL_ADDR;
Expand Down Expand Up @@ -107,32 +106,3 @@ export const routeDropAndBoostrap = async (params: DropAndBootstrapParams) => {

return receipt.transactionHash;
};

export const rescueDropAndBoostrap = async (params: DropAndBootstrapParams) => {
const { factory, feeAddr, relayerAddr } = await prepareDropAndBoostrap();

const dropFee = params.gasDrop ? DROP_SWAP_AMOUNT_JITOSOL : 0;
const dropAmountAca = params.gasDrop ? DROP_AMOUNT_ACA : 0;
const [tokenAddr, otherContributionToken] = params.feeToken === 'jitosol'
? [JITOSOL_ADDR, LDOT]
: [LDOT, JITOSOL_ADDR];

const insts = {
...DEFAULT_DROP_AND_BOOTSTRAP_PARAMS,
recipient: params.recipient,
feeReceiver: relayerAddr,
dropFee,
otherContributionToken,
};

const tx = await factory.deployDropAndBootstrapStakeRouterAndRescue(
feeAddr,
insts,
tokenAddr,
dropAmountAca,
params.gasDrop,
);
const receipt = await tx.wait();

return receipt.transactionHash;
};
4 changes: 0 additions & 4 deletions src/middlewares/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,6 @@ const ROUTER_CONFIGS: {
schema: dropAndBootstrapSchema,
handler: routeDropAndBoostrap,
},
'/rescueDropAndBootstrap': {
schema: dropAndBootstrapSchema,
handler: rescueDropAndBoostrap,
},
},
};

Expand Down

0 comments on commit 0e8fa39

Please sign in to comment.