-
Notifications
You must be signed in to change notification settings - Fork 704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: stop loss with autonomy on-chain bot #846
Open
unbreakablery
wants to merge
71
commits into
sushiswap:master
Choose a base branch
from
Autonomy-Network:feat/stop-loss-with-autonomy-bot
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 40 commits
Commits
Show all changes
71 commits
Select commit
Hold shift + click to select a range
c9f6599
feat: stop-loss view
unbreakablery d2a0805
Merge branch 'master' of github.com-unbreakablery:sushiswap/sushiswap…
unbreakablery fe34527
feat: integrate autonomy for stop-loss
unbreakablery 383efbb
fix: autonomy addresses
unbreakablery dd46442
fix: autonomy validation
unbreakablery a5aa1a0
feat: add autonomy reg of avax
unbreakablery 301aec7
fix: stop-loss by autonomy bot
unbreakablery bb18012
feat: update stopLimitOrder ui
unbreakablery bfa56b7
feat: prepareOracleData for stopPrice
unbreakablery c30c160
feat: implement stopLimitOrder
unbreakablery be92943
refactor: stopLimitOrder
unbreakablery 63652ad
feat: update stopLimitOrderWrapper address
unbreakablery 2b421f3
fix: avax chainlinkV2 addr
unbreakablery b21d5cf
fix: oracleData in stopLimitOrder
unbreakablery 8afebfa
fix: stopLimitOrder slippage as 10%
unbreakablery c6699c3
fix: stopLimitOrder ui
unbreakablery dacd9e7
fix: stopLimitOrder ui/ux
unbreakablery 58fc603
refactor: stopLimitOrder ui
unbreakablery a223eb2
refactor: stop-limit-order
unbreakablery b29d0fb
refactor: stop-limit-order
unbreakablery 45547b3
fix: stopLimitOrderWrapper address
unbreakablery 7aac349
refactor: stop loss order hooks
unbreakablery 0111d99
feat: stop limit order ui popup
unbreakablery dd9df02
feat: customize stop-loss ui
unbreakablery baf0ee9
feat: fetch stop-loss-order history
unbreakablery 854e95f
fix: useStopLossOrders
unbreakablery df78e9a
feat: parse stopLossOrder
unbreakablery 40f9500
fix: fetch history from moralis
unbreakablery e4d7933
fix: fetch stop-loss-orders
unbreakablery 5c16bd1
feat: fetch exec stop-loss-orders
unbreakablery df066e8
fix: fetching stop-loss-orders
unbreakablery 19b82b6
fix: stop-loss-orders ui
unbreakablery 91db9cf
fix: open orders list
unbreakablery f12a954
Merge branch 'master' of github.com-unbreakablery:sushiswap/sushiswap…
unbreakablery 52011bc
feat: show open/history of stop-loss-orders
unbreakablery 75fd7c5
feat: cancel stop-loss orders
unbreakablery cb5792f
feat: update stop-loss orders ui
unbreakablery 2467f17
fix: env var for stop-loss
unbreakablery e17dcc2
Merge branch 'master' of github.com-unbreakablery:sushiswap/sushiswap…
unbreakablery b825dbc
Merge branch 'master' into feat/stop-loss-with-autonomy-bot
unbreakablery 7f49911
Merge branch 'master' of github.com-unbreakablery:sushiswap/sushiswap…
unbreakablery e6016a3
fix: add explainer in stop-loss ui
unbreakablery 31fa95f
Merge branch 'master' of github.com-unbreakablery:sushiswap/sushiswap…
unbreakablery f36a2d8
feat: add input validation in stop-loss ui
unbreakablery 89d74ab
fix: stop-loss orders ui
unbreakablery 38b4f81
feat: add amount validation in stop-loss ui
unbreakablery fb2b207
fix: margin rate validation in stop-loss order
unbreakablery d1e9956
refactor: stop and minimum rate validation in stop-loss
unbreakablery 690dfd0
fix: amountExternal in stop-loss
unbreakablery 2528a36
chore: moralis version
unbreakablery b1183ae
fix: moralis version
unbreakablery 18830db
fix: stop-loss order params
unbreakablery 613ee23
fix: stop-loss validation
unbreakablery 0c776b2
fix: stop-loss validation
unbreakablery 57c3bac
fix: pagination in stop-loss ui
unbreakablery b66d786
fix: stop-loss orders pagination
unbreakablery b763dd2
feat: expert mode in stop-loss
unbreakablery 6806495
Merge branch 'master' of github.com-unbreakablery:sushiswap/sushiswap…
unbreakablery 3dda0ca
fix: stop loss ui
unbreakablery c2ba3a0
Merge branch 'master' of github.com-unbreakablery:sushiswap/sushiswap…
unbreakablery 5ef81cc
fix: stop-loss zero-division issue
unbreakablery eb96493
feat: add more validation in stop-loss ui
unbreakablery a468b7e
fix: stop-loss overflow
unbreakablery c3523fa
Merge branch 'master' of github.com-unbreakablery:sushiswap/sushiswap…
unbreakablery 74eeb94
fix: dependency of moralis
unbreakablery a77beb3
fix: moralis version
unbreakablery 32ccf13
Merge branch 'master' of github.com-unbreakablery:sushiswap/sushiswap…
unbreakablery f28b4ca
fix: npm dependency
unbreakablery 8169b73
fix: trade nav header
unbreakablery 62c7c78
feat: add more stopLimitOrder wrapper
unbreakablery ed0b5f4
Merge branch 'master' of github.com-unbreakablery:sushiswap/sushiswap…
unbreakablery File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"inputs":[{"internalType":"contract IStakeManager","name":"stakeMan","type":"address"},{"internalType":"contract IOracle","name":"oracle","type":"address"},{"internalType":"contract IForwarder","name":"userForwarder","type":"address"},{"internalType":"contract IForwarder","name":"gasForwarder","type":"address"},{"internalType":"contract IForwarder","name":"userGasForwarder","type":"address"},{"internalType":"string","name":"tokenName","type":"string"},{"internalType":"string","name":"tokenSymbol","type":"string"},{"internalType":"uint256","name":"totalAUTOSupply","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"address payable","name":"referer","type":"address"},{"indexed":false,"internalType":"bytes","name":"callData","type":"bytes"},{"indexed":false,"internalType":"uint112","name":"initEthSent","type":"uint112"},{"indexed":false,"internalType":"uint112","name":"ethForCall","type":"uint112"},{"indexed":false,"internalType":"bool","name":"verifyUser","type":"bool"},{"indexed":false,"internalType":"bool","name":"insertFeeAmount","type":"bool"},{"indexed":false,"internalType":"bool","name":"payWithAUTO","type":"bool"},{"indexed":false,"internalType":"bool","name":"isAlive","type":"bool"}],"name":"HashedReqAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"HashedReqCancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"bool","name":"wasRemoved","type":"bool"}],"name":"HashedReqExecuted","type":"event"},{"inputs":[],"name":"BASE_BPS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GAS_OVERHEAD_AUTO","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GAS_OVERHEAD_ETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAY_AUTO_BPS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAY_ETH_BPS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"components":[{"internalType":"address payable","name":"user","type":"address"},{"internalType":"address","name":"target","type":"address"},{"internalType":"address payable","name":"referer","type":"address"},{"internalType":"bytes","name":"callData","type":"bytes"},{"internalType":"uint112","name":"initEthSent","type":"uint112"},{"internalType":"uint112","name":"ethForCall","type":"uint112"},{"internalType":"bool","name":"verifyUser","type":"bool"},{"internalType":"bool","name":"insertFeeAmount","type":"bool"},{"internalType":"bool","name":"payWithAUTO","type":"bool"},{"internalType":"bool","name":"isAlive","type":"bool"}],"internalType":"struct IRegistry.Request","name":"r","type":"tuple"}],"name":"cancelHashedReq","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"components":[{"internalType":"address payable","name":"user","type":"address"},{"internalType":"address","name":"target","type":"address"},{"internalType":"address payable","name":"referer","type":"address"},{"internalType":"bytes","name":"callData","type":"bytes"},{"internalType":"uint112","name":"initEthSent","type":"uint112"},{"internalType":"uint112","name":"ethForCall","type":"uint112"},{"internalType":"bool","name":"verifyUser","type":"bool"},{"internalType":"bool","name":"insertFeeAmount","type":"bool"},{"internalType":"bool","name":"payWithAUTO","type":"bool"},{"internalType":"bool","name":"isAlive","type":"bool"}],"internalType":"struct IRegistry.Request","name":"r","type":"tuple"},{"internalType":"uint256","name":"expectedGas","type":"uint256"}],"name":"executeHashedReq","outputs":[{"internalType":"uint256","name":"gasUsed","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAUTOAddr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"getExecCountOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getGasForwarder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getHashedReq","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getHashedReqs","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getHashedReqsLen","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"startIdx","type":"uint256"},{"internalType":"uint256","name":"endIdx","type":"uint256"}],"name":"getHashedReqsSlice","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getOracle","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"getReferalCountOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address payable","name":"user","type":"address"},{"internalType":"address","name":"target","type":"address"},{"internalType":"address payable","name":"referer","type":"address"},{"internalType":"bytes","name":"callData","type":"bytes"},{"internalType":"uint112","name":"initEthSent","type":"uint112"},{"internalType":"uint112","name":"ethForCall","type":"uint112"},{"internalType":"bool","name":"verifyUser","type":"bool"},{"internalType":"bool","name":"insertFeeAmount","type":"bool"},{"internalType":"bool","name":"payWithAUTO","type":"bool"},{"internalType":"bool","name":"isAlive","type":"bool"}],"internalType":"struct IRegistry.Request","name":"r","type":"tuple"}],"name":"getReqBytes","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"getReqCountOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getStakeManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getUserForwarder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getUserGasForwarder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"callData","type":"bytes"},{"internalType":"uint256","name":"expectedGas","type":"uint256"},{"internalType":"uint256","name":"startIdx","type":"uint256"}],"name":"insertToCallData","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"address payable","name":"referer","type":"address"},{"internalType":"bytes","name":"callData","type":"bytes"},{"internalType":"uint112","name":"ethForCall","type":"uint112"},{"internalType":"bool","name":"verifyUser","type":"bool"},{"internalType":"bool","name":"insertFeeAmount","type":"bool"},{"internalType":"bool","name":"isAlive","type":"bool"}],"name":"newReq","outputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"address payable","name":"referer","type":"address"},{"internalType":"bytes","name":"callData","type":"bytes"},{"internalType":"uint112","name":"ethForCall","type":"uint112"},{"internalType":"bool","name":"verifyUser","type":"bool"},{"internalType":"bool","name":"insertFeeAmount","type":"bool"},{"internalType":"bool","name":"payWithAUTO","type":"bool"},{"internalType":"bool","name":"isAlive","type":"bool"}],"name":"newReqPaySpecific","outputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"inputs":[{"internalType":"address payable","name":"registry_","type":"address"},{"internalType":"address","name":"gasFeeForwarder_","type":"address"},{"internalType":"address","name":"bentoBox_","type":"address"},{"internalType":"address","name":"stopLimitOrderContract_","type":"address"},{"internalType":"address","name":"WETH_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bentoBox","outputs":[{"internalType":"contract IBentoBoxV1","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"feeAmount","type":"uint256"},{"components":[{"internalType":"address","name":"maker","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"stopPrice","type":"uint256"},{"internalType":"contract IOracle","name":"oracleAddress","type":"address"},{"internalType":"bytes","name":"oracleData","type":"bytes"},{"internalType":"uint256","name":"amountToFill","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct OrderArgs","name":"order","type":"tuple"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"fillOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"gasFeeForwarder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"registry","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stopLimitOrderContract","outputs":[{"internalType":"contract IStopLimitOrder","name":"","type":"address"}],"stateMutability":"view","type":"function"}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { AddressMap, ChainId } from '@sushiswap/core-sdk' | ||
|
||
export const QUERY_REQUEST_LIMIT = 10000 | ||
|
||
export const AUTONOMY_REGISTRY_ADDRESSES: AddressMap = { | ||
[ChainId.BSC]: '0x18d087F8D22D409D3CD366AF00BD7AeF0BF225Db', | ||
[ChainId.AVALANCHE]: '0x68FCbECa74A7E5D386f74E14682c94DE0e1bC56b', | ||
} | ||
|
||
export const STOP_LIMIT_ORDER_WRAPPER_ADDRESSES: AddressMap = { | ||
[ChainId.AVALANCHE]: '0x2f57dabe3dd1ecAed3F79a0D6d2530fCa5A11912', | ||
} | ||
|
||
export const CHAINLINK_ORACLE_ADDRESS: AddressMap = { | ||
[ChainId.BSC]: '0x00632CFe43d8F9f8E6cD0d39Ffa3D4fa7ec73CFB', | ||
[ChainId.AVALANCHE]: '0x232d595594585613F48aaE9c85861E4aB06CE3E5', | ||
} | ||
|
||
interface MoralisInfo { | ||
serverURL: string | ||
key: string | ||
} | ||
|
||
export const MORALIS_INFO: { [chainId: number]: MoralisInfo } = { | ||
[ChainId.AVALANCHE]: { | ||
serverURL: process.env.NEXT_PUBLIC_AUTONOMY_MORALIS_URL_AVAX || '', | ||
key: process.env.NEXT_PUBLIC_AUTONOMY_MORALIS_KEY_AVAX || '', | ||
}, | ||
[ChainId.BSC]: { | ||
serverURL: process.env.NEXT_PUBLIC_AUTONOMY_MORALIS_URL_BSC || '', | ||
key: process.env.NEXT_PUBLIC_AUTONOMY_MORALIS_KEY_BSC || '', | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
import { t } from '@lingui/macro' | ||
import { useLingui } from '@lingui/react' | ||
import Typography from 'app/components/Typography' | ||
import { useCompletedOrdersTableConfig } from 'app/features/stop-loss/useCompletedOrdersTableConfig' | ||
import { | ||
TABLE_TABLE_CLASSNAME, | ||
TABLE_TBODY_TD_CLASSNAME, | ||
TABLE_TBODY_TR_CLASSNAME, | ||
TABLE_TR_TH_CLASSNAME, | ||
TABLE_WRAPPER_DIV_CLASSNAME, | ||
} from 'app/features/trident/constants' | ||
import { classNames } from 'app/functions' | ||
import { useActiveWeb3React } from 'app/services/web3' | ||
import Link from 'next/link' | ||
import React, { FC } from 'react' | ||
import { useFlexLayout, usePagination, useSortBy, useTable } from 'react-table' | ||
|
||
import useStopLossOrders from './useStopLossOrders' | ||
|
||
const CompletedOrders: FC = () => { | ||
const { i18n } = useLingui() | ||
const { account } = useActiveWeb3React() | ||
const { loading, completed } = useStopLossOrders() | ||
const { config } = useCompletedOrdersTableConfig({ orders: completed }) | ||
|
||
// @ts-ignore TYPE NEEDS FIXING | ||
const { getTableProps, getTableBodyProps, headerGroups, prepareRow, page } = useTable( | ||
// @ts-ignore TYPE NEEDS FIXING | ||
config, | ||
useSortBy, | ||
usePagination, | ||
useFlexLayout | ||
) | ||
|
||
return ( | ||
<div className="flex flex-col gap-3"> | ||
<div className={TABLE_WRAPPER_DIV_CLASSNAME}> | ||
<table id="asset-balances-table" {...getTableProps()} className={TABLE_TABLE_CLASSNAME}> | ||
<thead> | ||
{headerGroups.map((headerGroup, i) => ( | ||
<tr {...headerGroup.getHeaderGroupProps()} key={i}> | ||
{headerGroup.headers.map((column, i) => ( | ||
<th | ||
// @ts-ignore TYPE NEEDS FIXING | ||
{...column.getHeaderProps(column.getSortByToggleProps())} | ||
key={i} | ||
className={TABLE_TR_TH_CLASSNAME(i, headerGroup.headers.length)} | ||
> | ||
{column.render('Header')} | ||
</th> | ||
))} | ||
</tr> | ||
))} | ||
</thead> | ||
<tbody {...getTableBodyProps()}> | ||
{page.length > 0 ? ( | ||
// @ts-ignore TYPE NEEDS FIXING | ||
page.map((row, i) => { | ||
prepareRow(row) | ||
return ( | ||
<tr {...row.getRowProps()} key={i} className={TABLE_TBODY_TR_CLASSNAME}> | ||
{/*@ts-ignore TYPE NEEDS FIXING*/} | ||
{row.cells.map((cell, i) => { | ||
return ( | ||
<td | ||
key={i} | ||
{...cell.getCellProps()} | ||
className={classNames( | ||
TABLE_TBODY_TD_CLASSNAME(i, row.cells.length), | ||
'cursor-default whitespace-nowrap' | ||
)} | ||
> | ||
{cell.render('Cell')} | ||
</td> | ||
) | ||
})} | ||
</tr> | ||
) | ||
}) | ||
) : ( | ||
<tr className={TABLE_TBODY_TR_CLASSNAME}> | ||
<td colSpan={4} className={classNames(TABLE_TBODY_TD_CLASSNAME(0, 1), 'justify-center cursor-default')}> | ||
<Typography | ||
variant="xs" | ||
className="text-center text-low-emphesis h-[60px] flex items-center justify-center" | ||
component="span" | ||
> | ||
{loading ? i18n._(t`Loading executed orders...`) : i18n._(t`No order history`)} | ||
</Typography> | ||
</td> | ||
</tr> | ||
)} | ||
</tbody> | ||
<tfoot> | ||
<tr className={classNames(TABLE_TBODY_TR_CLASSNAME)}> | ||
<td | ||
colSpan={4} | ||
className={classNames(TABLE_TBODY_TD_CLASSNAME(0, 1), 'justify-center cursor-default py-4')} | ||
> | ||
<Typography variant="xs" className="italic text-center text-low-emphesis"> | ||
Funds will be received in your{' '} | ||
<Link href={`/account/${account}`} passHref={true}> | ||
<Typography variant="xs" className="text-blue" component="span"> | ||
BentoBox | ||
</Typography> | ||
</Link>{' '} | ||
after order execution | ||
</Typography> | ||
</td> | ||
</tr> | ||
</tfoot> | ||
</table> | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
export default CompletedOrders |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the wrapper address is only set for avalanche, why is the feature enabled on avalance, bsc, fantom and ethereum? How does this work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we would like to deploy wrapper contract in other networks also.