Skip to content
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: improve Orderbook UI and buy/sell orders #539

Merged
merged 35 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
1224b3c
#537
dib542 Mar 14, 2024
babeb92
#541
dib542 Mar 14, 2024
42ad114
feat: add Order Type help: link to docs
dib542 Jan 31, 2024
c5eddc3
feat: switch pool token order when displaying a pair: tokenB/tokenA
dib542 Mar 11, 2024
ff81eb5
refactor: remove possibility of misaligning order type text values
dib542 Apr 7, 2024
abad4a3
refactor: read swap amout out from result payload instead of events
dib542 Apr 7, 2024
29cedf4
feat: add other types of limit orders to be used in inputs
dib542 Apr 7, 2024
c87f228
fix: add negative limit price check
dib542 Apr 7, 2024
ca6233a
fix: price directions are dependent on buy mode and token order
dib542 Apr 7, 2024
5ca0d78
feat: allow indexer stream hooks to include metadata like height
dib542 Apr 8, 2024
05f8eae
fix: update simulated place limit order on each liquidity movement
dib542 Apr 8, 2024
a2c3a50
fix: improve loading states during continuous limit order simulations
dib542 Apr 8, 2024
0902655
fix: calculate approx non-immediate limit order coin out for previews
dib542 Apr 9, 2024
e94af7d
Revert "fix: reduce FILL_OR_KILL bugs in simulations temporarily"
dib542 Apr 9, 2024
7c2274b
fix: display insufficient liquidity only when the error is encountered
dib542 Apr 9, 2024
6dd0796
feat: improve loading state keeping previous preview results
dib542 Apr 9, 2024
0e32ace
fix: correct the range slider input in buy mode for token out
dib542 Apr 9, 2024
adcae39
fix: dropdown click behavior: don't blur when Drawer is clicked
dib542 Apr 9, 2024
c408068
feat: add more gas for limit orders
dib542 Apr 9, 2024
b018de3
feat: improve Filled status calculation
dib542 Apr 9, 2024
429b154
fix: remove trade Status column for now
dib542 Apr 9, 2024
161502f
fix: add specific warning for "Swap amount too small" issue
dib542 Apr 9, 2024
6bafd3a
fix: add specific Fill Or Kill warning message
dib542 Apr 9, 2024
f8a9323
fix: don't persist preview value with 0 input
dib542 Apr 9, 2024
70d7db0
fix: improve when swap simulation is re-requested
dib542 Apr 9, 2024
f94e5c0
feat: add "Pair is not initialized" Swap warning
dib542 Apr 9, 2024
2dd441f
feat: add "Insufficient liquidity" Swap warning
dib542 Apr 9, 2024
3f69253
feat: add "Swap amount too small" Swap warning
dib542 Apr 9, 2024
4f60606
fix: allow setting an initial heartbeat height on a DualDataSet
dib542 Apr 9, 2024
67776af
fix: add better FoK error issue workaround
dib542 Apr 9, 2024
a447796
fix: read real-time price from fetch properly
dib542 Apr 9, 2024
1a820cd
feat: allow useRealtimePrice to have undefined inputs
dib542 Apr 9, 2024
8a50876
feat: use useRealtimePrice for default LimitOrder simulation price
dib542 Apr 9, 2024
ec05444
feat: use useRealtimePrice for midpoint of Orderbook list card
dib542 Apr 9, 2024
283a0c4
fix: errors on buy side were missed, match the input conditions better
dib542 Apr 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .env.beta
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ REACT_APP__CHAIN_PRETTY_NAME=Neutron

# App settings
REACT_APP__DEFAULT_PAIR=NEWT/NTRN
REACT_APP__HIDE_ORDERBOOK=1

# Chain data sources
REACT_APP__INDEXER_API=https://indexer.beta.duality.xyz
Expand Down
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"@chain-registry/client": "^1.18.0",
"@chain-registry/keplr": "^1.30.0",
"@chain-registry/utils": "^1.17.0",
"@cosmjs/amino": "0.31.1",
"@cosmjs/crypto": "0.31.1",
"@cosmjs/proto-signing": "0.31.1",
"@cosmjs/stargate": "0.31.1",
Expand Down
8 changes: 2 additions & 6 deletions src/components/Header/routes.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
const { REACT_APP__DEFAULT_PAIR = '', REACT_APP__HIDE_ORDERBOOK = '' } =
import.meta.env;
const { REACT_APP__DEFAULT_PAIR = '' } = import.meta.env;

export const pageLinkMap = {
[['/swap', REACT_APP__DEFAULT_PAIR].join('/')]: 'Swap',
'/pools': 'Pools',
// conditionally add the orderbook in
...(!REACT_APP__HIDE_ORDERBOOK && {
[['/orderbook', REACT_APP__DEFAULT_PAIR].join('/')]: 'Orderbook',
}),
[['/orderbook', REACT_APP__DEFAULT_PAIR].join('/')]: 'Orderbook',
'/portfolio': 'Portfolio',
'/bridge': 'Bridge',
'https://duality.gitbook.io/duality-documentation/user-interface': 'Docs',
Expand Down
8 changes: 4 additions & 4 deletions src/components/TokenPairLogos/TokenPairLogos.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ function TokenLogo({
const tokenSwitchDelayMs = 800;
export default function TokenPairLogos({
className,
tokenA,
tokenB,
tokenLeft: tokenA,
tokenRight: tokenB,
}: {
className?: string;
tokenA?: Token;
tokenB?: Token;
tokenLeft?: Token;
tokenRight?: Token;
}) {
const timeoutRef = useRef<NodeJS.Timeout | null>(null);
const [previousTokenA, setPreviousTokenA] = useState(tokenA);
Expand Down
Loading
Loading