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

Add Nabla UI #326

Merged
merged 62 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from 54 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
5f5e7bb
chore: install
Dec 8, 2023
6a5c25c
refactor: replace library
Dec 19, 2023
7f55cd8
Merge remote-tracking branch 'origin/staging' into refactor/replace-c…
Dec 19, 2023
3716ecc
feat: filter indexer data
Dec 26, 2023
1b529dd
refactor: use mock data
Dec 28, 2023
11eb4d9
feat: updated abi files
Dec 28, 2023
b604222
fix: contract execution
Jan 2, 2024
a87ca28
refactor: transaction helpers
Jan 2, 2024
9551e3c
feat: updated erc20 contract abi
Jan 4, 2024
855bb36
fix: lint issue
Jan 4, 2024
97d7671
feat: show validation errors
Jan 8, 2024
d821fd7
test: fix
Jan 8, 2024
abc8cff
refactor: removed logs
Jan 8, 2024
0d4a494
refactor: folders
Jan 8, 2024
19141b2
Merge branch 'staging' into refactor/replace-contract-library
ebma Jan 10, 2024
8938cd1
feat: updated message call
Jan 13, 2024
a6ca270
feat: added dev tools
Jan 13, 2024
f17c19c
Change PriceOracle metadata
TorstenStueber Jan 14, 2024
ad4ff0c
refactor: disable react query storage
Jan 14, 2024
ddf529c
Merge branch 'refactor/replace-contract-library' of github.com:pendul…
TorstenStueber Jan 14, 2024
00a32f9
fix: swap response
Jan 14, 2024
89c34ba
fix: contract failure
Jan 16, 2024
4eb5539
Merge branch 'refactor/replace-contract-library' of github.com:pendul…
TorstenStueber Jan 23, 2024
33ad4bc
Massive update and overhaul for Nabla UI
TorstenStueber Feb 21, 2024
03d1065
Some smaller fixes
TorstenStueber Feb 22, 2024
718a9d8
Use higher contract resource limits
TorstenStueber Feb 25, 2024
a53f44a
Allow tolerance for estimated gas limits
TorstenStueber Feb 26, 2024
c9abcbe
Funny commit
TorstenStueber Apr 6, 2024
85ab543
Temporary commit
TorstenStueber Apr 29, 2024
9473ace
Add NumberInput hack
TorstenStueber Apr 29, 2024
3e10a10
Reoarganize Nabla code
TorstenStueber Apr 30, 2024
758e9ba
Restructure options of contract hooks
TorstenStueber Apr 30, 2024
17fc304
Use new contracts metadata
TorstenStueber Apr 30, 2024
3a9adcd
Fix Swap interface
TorstenStueber Apr 30, 2024
f5fc88d
Fix formatting errors
TorstenStueber Apr 30, 2024
b729798
Remove console.logs
TorstenStueber Apr 30, 2024
821e44c
Fix maximum amount on swap pool deposit
TorstenStueber Apr 30, 2024
7d03646
Fix maximum amount on backstop pool deposit
TorstenStueber Apr 30, 2024
0633480
Fix maximum amount on backstop pool withdrawal
TorstenStueber Apr 30, 2024
a14b933
Fix maxmium amount on swap pool withdrawal and redeem
TorstenStueber Apr 30, 2024
fac7c06
Remove unused import
TorstenStueber Apr 30, 2024
38fcab7
Merge main into this branch
TorstenStueber Apr 30, 2024
938a5fa
Correct types for fix https://github.com/preactjs/preact/issues/4285
TorstenStueber Apr 30, 2024
e190809
Merge branch 'main' into refactor/replace-contract-library
TorstenStueber Apr 30, 2024
2f6893b
Make balance handling more precise and strict
TorstenStueber May 2, 2024
2ca45df
Create AmountSelector component
TorstenStueber May 3, 2024
7be3668
Massively update amount and big number logic
TorstenStueber May 8, 2024
a67b9c3
Implement Backstop Pool Redeem
TorstenStueber May 10, 2024
c654567
Fix code for backstop withdrawals
TorstenStueber May 11, 2024
ecc4a93
Fix swaps
TorstenStueber May 13, 2024
350ced3
Git ignore vite timestamp files
TorstenStueber May 13, 2024
a276221
Remove unnecessary code and resolve TODOs
TorstenStueber May 14, 2024
3c7f0d8
Remove console.log statements
TorstenStueber May 14, 2024
0dc1533
Add debug output to execute message calls
TorstenStueber May 15, 2024
4778d07
Upgrade api-solang version
TorstenStueber May 15, 2024
c164e5b
Implement PR comments
TorstenStueber May 16, 2024
a763e0a
Improve error messages
TorstenStueber May 16, 2024
d7abf15
Remove dev page
TorstenStueber May 16, 2024
f78ffab
Fix backstop pool withdrawal button enabled error
TorstenStueber May 16, 2024
553931d
Use token icons
TorstenStueber May 16, 2024
e071ccd
Merge branch 'main' into refactor/replace-contract-library
TorstenStueber May 16, 2024
64273f1
Rename Nabla to Forex AMM
TorstenStueber May 17, 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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,6 @@ dist-ssr
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
!.yarn/versions

vite.config.ts.timestamp-*
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ build/
preact/
internals/
docs/
gql/
.lighthouseci/

*.yml
Expand All @@ -13,4 +14,5 @@ package-lock.json
package.json
yarn.lock


CHANGELOG.md
2 changes: 1 addition & 1 deletion codegen.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CodegenConfig } from '@graphql-codegen/cli';

const config: CodegenConfig = {
schema: 'https://squid.subsquid.io/foucoco-squid/graphql',
schema: 'https://pendulum.squids.live/foucoco-squid/graphql',
documents: ['**/*.{ts,tsx}', '!gql/**/*'],
generates: {
'./gql/': {
Expand Down
2 changes: 1 addition & 1 deletion config/setupTests.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/* eslint-env jest */
import '@testing-library/jest-dom/extend-expect';
import '@testing-library/jest-dom';
19 changes: 2 additions & 17 deletions gql/gql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/
* Therefore it is highly recommended to use the babel or swc plugin for production.
*/
const documents = {
"\n query getBackstopPool($id: String!) {\n backstopPoolById(id: $id) {\n id\n liabilities\n paused\n reserves\n totalSupply\n token {\n decimals\n id\n name\n symbol\n }\n router {\n swapPools(where: { router_isNull: false, paused_not_eq: true }) {\n id\n liabilities\n paused\n reserves\n totalSupply\n token {\n decimals\n id\n name\n symbol\n }\n }\n id\n }\n }\n }\n": types.GetBackstopPoolDocument,
"\n query getBackstopPools {\n backstopPools(where: { paused_eq: false }) {\n id\n liabilities\n paused\n reserves\n totalSupply\n token {\n id\n decimals\n name\n symbol\n }\n router {\n swapPools(where: { router_isNull: false, paused_not_eq: true }) {\n id\n }\n id\n }\n }\n }\n": types.GetBackstopPoolsDocument,
"\n query getSwapPools {\n swapPools(where: { paused_eq: false }) {\n id\n liabilities\n paused\n reserves\n totalSupply\n token {\n id\n name\n symbol\n decimals\n }\n router {\n id\n paused\n }\n backstop {\n id\n liabilities\n paused\n reserves\n totalSupply\n }\n }\n }\n": types.GetSwapPoolsDocument,
"\n query getTokens {\n nablaTokens {\n id\n name\n symbol\n decimals\n }\n }\n": types.GetTokensDocument,
"\n query getRouter($id: String!) {\n routerById(id: $id) {\n id\n swapPools {\n id\n paused\n name\n reserve\n reserveWithSlippage\n totalLiabilities\n totalSupply\n lpTokenDecimals\n apr\n symbol\n token {\n id\n decimals\n name\n symbol\n }\n insuranceFeeBps\n protocolTreasuryAddress\n }\n backstopPool {\n id\n name\n paused\n symbol\n totalSupply\n apr\n reserves\n lpTokenDecimals\n token {\n id\n decimals\n name\n symbol\n }\n }\n paused\n }\n }\n": types.GetRouterDocument,
};

/**
Expand All @@ -36,19 +33,7 @@ export function graphql(source: string): unknown;
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(source: "\n query getBackstopPool($id: String!) {\n backstopPoolById(id: $id) {\n id\n liabilities\n paused\n reserves\n totalSupply\n token {\n decimals\n id\n name\n symbol\n }\n router {\n swapPools(where: { router_isNull: false, paused_not_eq: true }) {\n id\n liabilities\n paused\n reserves\n totalSupply\n token {\n decimals\n id\n name\n symbol\n }\n }\n id\n }\n }\n }\n"): (typeof documents)["\n query getBackstopPool($id: String!) {\n backstopPoolById(id: $id) {\n id\n liabilities\n paused\n reserves\n totalSupply\n token {\n decimals\n id\n name\n symbol\n }\n router {\n swapPools(where: { router_isNull: false, paused_not_eq: true }) {\n id\n liabilities\n paused\n reserves\n totalSupply\n token {\n decimals\n id\n name\n symbol\n }\n }\n id\n }\n }\n }\n"];
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(source: "\n query getBackstopPools {\n backstopPools(where: { paused_eq: false }) {\n id\n liabilities\n paused\n reserves\n totalSupply\n token {\n id\n decimals\n name\n symbol\n }\n router {\n swapPools(where: { router_isNull: false, paused_not_eq: true }) {\n id\n }\n id\n }\n }\n }\n"): (typeof documents)["\n query getBackstopPools {\n backstopPools(where: { paused_eq: false }) {\n id\n liabilities\n paused\n reserves\n totalSupply\n token {\n id\n decimals\n name\n symbol\n }\n router {\n swapPools(where: { router_isNull: false, paused_not_eq: true }) {\n id\n }\n id\n }\n }\n }\n"];
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(source: "\n query getSwapPools {\n swapPools(where: { paused_eq: false }) {\n id\n liabilities\n paused\n reserves\n totalSupply\n token {\n id\n name\n symbol\n decimals\n }\n router {\n id\n paused\n }\n backstop {\n id\n liabilities\n paused\n reserves\n totalSupply\n }\n }\n }\n"): (typeof documents)["\n query getSwapPools {\n swapPools(where: { paused_eq: false }) {\n id\n liabilities\n paused\n reserves\n totalSupply\n token {\n id\n name\n symbol\n decimals\n }\n router {\n id\n paused\n }\n backstop {\n id\n liabilities\n paused\n reserves\n totalSupply\n }\n }\n }\n"];
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(source: "\n query getTokens {\n nablaTokens {\n id\n name\n symbol\n decimals\n }\n }\n"): (typeof documents)["\n query getTokens {\n nablaTokens {\n id\n name\n symbol\n decimals\n }\n }\n"];
export function graphql(source: "\n query getRouter($id: String!) {\n routerById(id: $id) {\n id\n swapPools {\n id\n paused\n name\n reserve\n reserveWithSlippage\n totalLiabilities\n totalSupply\n lpTokenDecimals\n apr\n symbol\n token {\n id\n decimals\n name\n symbol\n }\n insuranceFeeBps\n protocolTreasuryAddress\n }\n backstopPool {\n id\n name\n paused\n symbol\n totalSupply\n apr\n reserves\n lpTokenDecimals\n token {\n id\n decimals\n name\n symbol\n }\n }\n paused\n }\n }\n"): (typeof documents)["\n query getRouter($id: String!) {\n routerById(id: $id) {\n id\n swapPools {\n id\n paused\n name\n reserve\n reserveWithSlippage\n totalLiabilities\n totalSupply\n lpTokenDecimals\n apr\n symbol\n token {\n id\n decimals\n name\n symbol\n }\n insuranceFeeBps\n protocolTreasuryAddress\n }\n backstopPool {\n id\n name\n paused\n symbol\n totalSupply\n apr\n reserves\n lpTokenDecimals\n token {\n id\n decimals\n name\n symbol\n }\n }\n paused\n }\n }\n"];

export function graphql(source: string) {
return (documents as any)[source] ?? {};
Expand Down
Loading
Loading