Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
dohaki committed Nov 27, 2023
1 parent 8b5395c commit ae177d1
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 32 deletions.
42 changes: 26 additions & 16 deletions src/stories/PaginatedDepositsTable.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,18 +95,23 @@ const mockedDeposits: Deposit[] = [
initialRelayerFeePct: "28434751200000000",
suggestedRelayerFeePct: "28443917866666666",
feeBreakdown: {
bridgeFee: {
pct: "28434751200000000",
usd: "341217014400000000",
},
destinationGasFee: {
pct: "28434751200000000",
usd: "341217014400000000",
},
lpFeeUsd: "341217014400000000",
lpFeePct: "28434751200000000",
lpFeeAmount: "341217014400000000",
relayCapitalFeeUsd: "341217014400000000",
relayCapitalFeePct: "28434751200000000",
relayCapitalFeeAmount: "341217014400000000",
relayGasFeeUsd: "341217014400000000",
relayGasFeePct: "28434751200000000",
relayGasFeeAmount: "341217014400000000",
totalBridgeFeeUsd: "341217014400000000",
totalBridgeFeePct: "28434751200000000",
totalBridgeFeeAmount: "341217014400000000",
},
rewards: {
type: "referrals",
rate: 0.4,
tier: 1,
amount: "341217014400000000",
usd: "341217014400000000",
},
Expand Down Expand Up @@ -135,18 +140,23 @@ const mockedDeposits: Deposit[] = [
initialRelayerFeePct: "28434751200000000",
suggestedRelayerFeePct: "28443917866666666",
feeBreakdown: {
bridgeFee: {
pct: "28434751200000000",
usd: "341217014400000000",
},
destinationGasFee: {
pct: "28434751200000000",
usd: "341217014400000000",
},
lpFeeUsd: "341217014400000000",
lpFeePct: "28434751200000000",
lpFeeAmount: "341217014400000000",
relayCapitalFeeUsd: "341217014400000000",
relayCapitalFeePct: "28434751200000000",
relayCapitalFeeAmount: "341217014400000000",
relayGasFeeUsd: "341217014400000000",
relayGasFeePct: "28434751200000000",
relayGasFeeAmount: "341217014400000000",
totalBridgeFeeUsd: "341217014400000000",
totalBridgeFeePct: "28434751200000000",
totalBridgeFeeAmount: "341217014400000000",
},
rewards: {
type: "referrals",
rate: 0.4,
tier: 1,
amount: "341217014400000000",
usd: "341217014400000000",
},
Expand Down
40 changes: 24 additions & 16 deletions src/views/DepositStatus/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,18 @@ export function convertForDepositQuery(
sendDepositArgs.relayerFeePct
).toString(),
feeBreakdown: {
bridgeFee: {
pct: quote.totalBridgeFeePct,
usd: quote.totalBridgeFeeUsd,
},
destinationGasFee: {
pct: quote.relayGasFeePct,
usd: quote.relayGasFeeTotalUsd,
},
lpFeeUsd: quote.lpFeeTotalUsd,
lpFeePct: quote.lpFeePct,
lpFeeAmount: quote.lpFeeTotal,
relayCapitalFeeUsd: quote.capitalFeeTotalUsd,
relayCapitalFeePct: quote.capitalFeePct,
relayCapitalFeeAmount: quote.capitalFeeTotal,
relayGasFeeUsd: quote.relayGasFeeTotalUsd,
relayGasFeePct: quote.relayGasFeePct,
relayGasFeeAmount: quote.relayFeeTotal,
totalBridgeFeeUsd: quote.totalBridgeFeeUsd,
totalBridgeFeePct: quote.totalBridgeFeePct,
totalBridgeFeeAmount: quote.totalBridgeFee,
},
};
}
Expand Down Expand Up @@ -79,14 +83,18 @@ export function convertForFillQuery(
sendDepositArgs.relayerFeePct
).toString(),
feeBreakdown: {
bridgeFee: {
pct: quote.totalBridgeFeePct,
usd: quote.totalBridgeFeeUsd,
},
destinationGasFee: {
pct: quote.relayGasFeePct,
usd: quote.relayGasFeeTotalUsd,
},
lpFeeUsd: quote.lpFeeTotalUsd,
lpFeePct: quote.lpFeePct,
lpFeeAmount: quote.lpFeeTotal,
relayCapitalFeeUsd: quote.capitalFeeTotalUsd,
relayCapitalFeePct: quote.capitalFeePct,
relayCapitalFeeAmount: quote.capitalFeeTotal,
relayGasFeeUsd: quote.relayGasFeeTotalUsd,
relayGasFeePct: quote.relayGasFeePct,
relayGasFeeAmount: quote.relayFeeTotal,
totalBridgeFeeUsd: quote.totalBridgeFeeUsd,
totalBridgeFeePct: quote.totalBridgeFeePct,
totalBridgeFeeAmount: quote.totalBridgeFee,
},
};
}

0 comments on commit ae177d1

Please sign in to comment.