Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
601 commits
Select commit Hold shift + click to select a range
3a7893e
wip: Rename prop
akaia-shadowfox Oct 24, 2022
f0cd04b
wip: Update config edit related logic & UI
akaia-shadowfox Oct 24, 2022
f045812
fix: Override global font-size
akaia-shadowfox Oct 24, 2022
7a4d675
fix: Prevent empty addresses from adding
akaia-shadowfox Oct 24, 2022
a332425
fix: Use singular form
akaia-shadowfox Oct 24, 2022
f8fed63
wip: Fix job settings form behavior & apply minor changes
akaia-shadowfox Oct 24, 2022
b44da85
wip: Apply standard gap for job settings
akaia-shadowfox Oct 24, 2022
e64a120
wip: Update styles
akaia-shadowfox Oct 26, 2022
0e61e66
wip: Update job settings styles & Set min job bond
akaia-shadowfox Oct 26, 2022
605a1b0
wip: Add reversed mode for icon label
akaia-shadowfox Oct 26, 2022
4d3803c
wip: Update styles
akaia-shadowfox Oct 26, 2022
0de080a
wip: Remove unused code
akaia-shadowfox Oct 26, 2022
71d22d6
feat: Allow tables to have selectable rows
akaia-shadowfox Oct 26, 2022
cdd1628
wip: Add global styles override for MUi checkbox
akaia-shadowfox Oct 26, 2022
1cbd02f
wip: Update MUI checkbox global styles
akaia-shadowfox Oct 26, 2022
36ccb8e
wip: Update table row selection logic & styles
akaia-shadowfox Oct 26, 2022
680e090
fix: Prevent removal request failing
akaia-shadowfox Oct 26, 2022
edf5674
wip: Fix state management issues & Add proposal creation
akaia-shadowfox Oct 26, 2022
e0d8990
wip: Implement transaction sending on form submit
akaia-shadowfox Oct 28, 2022
6683fa2
wip: Use NearLink component
akaia-shadowfox Oct 28, 2022
bf51d16
wip: Update `Tile` API
akaia-shadowfox Oct 28, 2022
f058847
wip: Submit adding new token on Enter key up
akaia-shadowfox Oct 28, 2022
b20150d
fix: Extend table rows with props bypassing
akaia-shadowfox Oct 28, 2022
6626285
wip: Update compact table row slot styles
akaia-shadowfox Oct 28, 2022
2da412f
wip: Fix token lists cross-checking & update styles
akaia-shadowfox Oct 28, 2022
62325bb
fix: Use updated prop name & Remove unused code
akaia-shadowfox Oct 28, 2022
1b4e332
wip: Update styles for dense tables
akaia-shadowfox Oct 28, 2022
991aa6e
fix: proposal info not getting into tx
mohamedalichelbi Oct 28, 2022
032fab7
wip: Apply minor amendments
akaia-shadowfox Oct 31, 2022
7a2026e
fix: Reset child forms properly
akaia-shadowfox Oct 31, 2022
73881ae
wip: Improve explicitness
akaia-shadowfox Oct 31, 2022
04ab7f5
wip: Add table row highlighting parameter
akaia-shadowfox Oct 31, 2022
77ed9ba
wip: Apply minor amendments
akaia-shadowfox Nov 2, 2022
0a08a82
wip: Implement diff color highlighting
akaia-shadowfox Nov 2, 2022
47543af
wip: Export TextInput-like proptypes
akaia-shadowfox Nov 2, 2022
e0a9381
wip: Use safer and more flexible typings
akaia-shadowfox Nov 2, 2022
5c6aefe
fix: Diff is not `Entity`'s scope of responsibility
akaia-shadowfox Nov 2, 2022
749c17b
wip: Update core typedefs
akaia-shadowfox Nov 2, 2022
ce0adad
wip: Change highlight color variants
akaia-shadowfox Nov 2, 2022
4b9f15a
wip: Implement changes color highlighting for job settings
akaia-shadowfox Nov 2, 2022
a0429c2
feat: Implement removal mark rollback
akaia-shadowfox Nov 2, 2022
cca04b0
wip: Fix type incompatibility
akaia-shadowfox Nov 2, 2022
ca686e9
wip: Expose configs & Update typedefs
akaia-shadowfox Nov 2, 2022
da3c4f7
fix: Reset form value if it's identical to contract's one
akaia-shadowfox Nov 3, 2022
a419568
chore: Update spell checker dictionary
akaia-shadowfox Nov 4, 2022
da85633
wip: Update `TextInput` props
akaia-shadowfox Nov 4, 2022
01a679d
wip: Separate proposal submit form
akaia-shadowfox Nov 4, 2022
7946c56
wip: Decrease redundancy
akaia-shadowfox Nov 4, 2022
bd390f7
chore: Remove unused import
akaia-shadowfox Nov 4, 2022
b794b51
wip: Draft diff renderer
akaia-shadowfox Nov 4, 2022
82fff44
wip: Fine-tune dense table's styles
akaia-shadowfox Nov 5, 2022
bed569d
wip Calibrate gaps
akaia-shadowfox Nov 5, 2022
fbd3a40
wip: Rename `Dependencies` -> `Inputs`
akaia-shadowfox Nov 7, 2022
1c52dfc
wip: Update multicall config editor
akaia-shadowfox Nov 7, 2022
a7b07ba
wip: Update features' configs
akaia-shadowfox Nov 7, 2022
97676ab
chore: Remove debug artifact
akaia-shadowfox Nov 7, 2022
173baa8
wip: Change button group default placement
akaia-shadowfox Nov 7, 2022
2d6bee4
feat: Implement config changes summary
akaia-shadowfox Nov 7, 2022
d86774f
wip: Update config changes summary styles
akaia-shadowfox Nov 7, 2022
34890cd
wip: Update styles & configs
akaia-shadowfox Nov 7, 2022
f9edc0d
wip: Remove all `Object.assign` calls
akaia-shadowfox Nov 9, 2022
60d8be9
wip: Fix infinite loop
akaia-shadowfox Nov 9, 2022
ed0a7eb
wip: Fix edit mode reactive switching
akaia-shadowfox Nov 9, 2022
562d5ec
fix: Replace glitchy `TextInput` with MUI `TextField`
akaia-shadowfox Nov 9, 2022
2040d44
chore: Remove debug artifacts
akaia-shadowfox Nov 10, 2022
d5cecfa
chore: Update placeholder function
akaia-shadowfox Nov 10, 2022
d86dbc4
wip: Update `Wallet` public interface
akaia-shadowfox Nov 10, 2022
06e6c61
feat: Implement proposal creation permission compliance
akaia-shadowfox Nov 10, 2022
d5730de
Merge branch 'feature/shopping-cart-updates' of https://github.com/ne…
akaia-shadowfox Nov 10, 2022
a9ad8ec
fix: Use more informative tooltip text
akaia-shadowfox Nov 10, 2022
3c43c73
fix: Show summary job bond in NEAR
akaia-shadowfox Nov 11, 2022
264758c
fix: Use NearIcon for config changes summary job bond
akaia-shadowfox Nov 13, 2022
470ed68
feat: Allow to use React node as tooltip content
akaia-shadowfox Nov 14, 2022
6c2299f
wip: Separate link abstraction from NEAR link
akaia-shadowfox Nov 14, 2022
0fde626
Merge branch 'main' of https://github.com/near-multicall/ui into feat…
akaia-shadowfox Nov 14, 2022
4272f81
wip: Update anchors styles
akaia-shadowfox Nov 14, 2022
babfcb0
fix: Update references after breaking changes merge
akaia-shadowfox Nov 14, 2022
b1b5f6d
fix: Use correct `Link` props is `NearLink`
akaia-shadowfox Nov 14, 2022
3c8d70b
wip: Implement tooltip copy button mock
akaia-shadowfox Nov 14, 2022
5aed4e1
wip: Update `Link` and `NearLink`
akaia-shadowfox Nov 14, 2022
38ec630
wip: Merge shared UI
akaia-shadowfox Nov 15, 2022
ae919e3
chore: Rename `shared/ui/components` -> `shared/ui/design`
akaia-shadowfox Nov 15, 2022
f168418
chore: Rename `form-kit` -> `forms`
akaia-shadowfox Nov 15, 2022
f8fb227
Merge branch 'main' of https://github.com/near-multicall/ui into feat…
akaia-shadowfox Nov 15, 2022
8cda927
wip: Merge file field
akaia-shadowfox Nov 15, 2022
60a1bab
fix: css cleanup
lennczar Nov 15, 2022
b9885fb
wip: Fix imports
akaia-shadowfox Nov 15, 2022
3ab8986
Merge branch 'feature/shopping-cart' of https://github.com/near-multi…
akaia-shadowfox Nov 15, 2022
4ba1829
fix: Disable link copy WIP feature
akaia-shadowfox Nov 15, 2022
95e5ee6
fix: Restore click event propagation & Update styles
akaia-shadowfox Nov 15, 2022
22a610b
wip: Update link tooltip styles
akaia-shadowfox Nov 16, 2022
2e78d64
wip: Update link tooltip styles
akaia-shadowfox Nov 16, 2022
e839386
wip: Update link tooltip styles
akaia-shadowfox Nov 16, 2022
84ccd74
wip: Update link tooltip styles
akaia-shadowfox Nov 16, 2022
314c5e9
wip: Update compact dense table row styles
akaia-shadowfox Nov 16, 2022
38aa30e
wip: Finish `Link` address copy tooltip amendments
akaia-shadowfox Nov 17, 2022
1575f7b
chore: Rename alias
akaia-shadowfox Nov 18, 2022
7bfaaff
chore: Remove adapter aliases
akaia-shadowfox Nov 20, 2022
d969887
Replace Account from near-api-js with string
mohamedalichelbi Nov 20, 2022
8f21d0d
Fix: config changes callback dpeends on changesDiff
mohamedalichelbi Nov 20, 2022
656b2a8
reduce copy button icon change to 1 second
mohamedalichelbi Nov 20, 2022
74daa6a
wip: Use types from `@near-wallet-selector/core`
akaia-shadowfox Nov 21, 2022
c5ed6fa
fix: Enable error handling for MI data fetch effect
akaia-shadowfox Nov 21, 2022
50a7b8e
added cosmetic types
lennczar Nov 21, 2022
23f55d5
chore: Remove unused module
akaia-shadowfox Nov 23, 2022
5b59feb
chore: Rename `ui/forms` -> `ui/form`
akaia-shadowfox Nov 23, 2022
3146478
chore: Rename property
akaia-shadowfox Nov 23, 2022
5619ed3
chore: Fix naming and labeling
akaia-shadowfox Nov 23, 2022
92ac7a5
fix: Change link tooltip auto hide delay
akaia-shadowfox Nov 23, 2022
421100d
wip: Shrink the gap between icon label elements
akaia-shadowfox Nov 23, 2022
dff1b19
wip: Apply graphical design remarks
akaia-shadowfox Nov 23, 2022
635d6be
wip: Fix tooltip
akaia-shadowfox Nov 23, 2022
d893c2b
wip: Move data fetch effect away from multicall adapter
akaia-shadowfox Nov 23, 2022
5acba17
wip: Apply post code review remarks
akaia-shadowfox Nov 24, 2022
4dd6368
Merge branch 'main' of https://github.com/near-multicall/ui into feat…
akaia-shadowfox Nov 24, 2022
609f563
fix: Use correct import paths
akaia-shadowfox Nov 24, 2022
ba7dbf7
wip: Apply post code review remarks
akaia-shadowfox Nov 24, 2022
703db2b
wip: Apply post code review remarks
akaia-shadowfox Nov 24, 2022
95f1e8c
wip: Apply post code review remarks
akaia-shadowfox Nov 25, 2022
b5ce02d
Merge branch 'main' of https://github.com/near-multicall/ui into feat…
akaia-shadowfox Nov 25, 2022
86df89f
Merge branch 'main' of https://github.com/near-multicall/ui into feat…
akaia-shadowfox Nov 25, 2022
67c3e2b
wip: Apply post code review remarks
akaia-shadowfox Nov 25, 2022
0ddaf5d
wip: Apply post code review remarks
akaia-shadowfox Nov 25, 2022
8d2f521
wip: Apply post code review remarks
akaia-shadowfox Nov 26, 2022
da50825
chore: Move configs to `shared/config`
akaia-shadowfox Nov 26, 2022
737ab07
wip: Update icon label styles
akaia-shadowfox Nov 26, 2022
684d1eb
wip: Apply post code review remarks
akaia-shadowfox Nov 26, 2022
0436ed8
wip: Apply post code review remarks
akaia-shadowfox Nov 26, 2022
a910b12
wip: Apply post code review remarks
akaia-shadowfox Nov 26, 2022
aacc854
Merge branch 'main' of https://github.com/near-multicall/ui into sett…
akaia-shadowfox Nov 29, 2022
4a15d02
wip: Reverse token whitelist items order
akaia-shadowfox Nov 30, 2022
6a037ee
wip: Remove debugging artifact
akaia-shadowfox Nov 30, 2022
0522942
chore: Use more accurate definition
akaia-shadowfox Nov 30, 2022
6e6156d
wip: Swap buttons
akaia-shadowfox Nov 30, 2022
a64773c
chore: Rename module context files
akaia-shadowfox Dec 2, 2022
048ec2f
wip: Conditionally hide tile header
akaia-shadowfox Dec 2, 2022
dcc0a57
Fix: Move away from deprecated React API
akaia-shadowfox Dec 8, 2022
6b16f44
Fix: Hide MI admins table properly
akaia-shadowfox Dec 8, 2022
4cf05e7
chore: Format
akaia-shadowfox Dec 8, 2022
6447654
wip: Rework MI data model
akaia-shadowfox Dec 8, 2022
6b5306a
wip: Connect MI settings provider properly
akaia-shadowfox Dec 8, 2022
be38cae
wip: Apply code review and naming remarks
akaia-shadowfox Dec 8, 2022
c02ec93
wip: Apply code review and naming remarks
akaia-shadowfox Dec 8, 2022
4c271d6
wip: Apply code review and naming remarks
akaia-shadowfox Dec 10, 2022
6b76195
wip: Fix React warning
akaia-shadowfox Dec 10, 2022
fb56ebb
wip: Use new `args` in NearLink
akaia-shadowfox Dec 10, 2022
d788e4f
chore: Update NEAR config path in env config error
akaia-shadowfox Dec 10, 2022
48bc35b
wip: Remove redundant / unused code & Fix errors
akaia-shadowfox Dec 10, 2022
0a85ec4
chore: Rename MI settings -> properties
akaia-shadowfox Dec 13, 2022
130f4c0
chore: Prepend context to MI providers module filename
akaia-shadowfox Dec 13, 2022
0220207
wip: Apply code review and naming remarks
akaia-shadowfox Dec 13, 2022
df6d641
wip: Remove type redundancy
akaia-shadowfox Dec 15, 2022
b4ef013
wip: Fix type error
akaia-shadowfox Dec 15, 2022
d3d33be
wip: Apply code review and naming remarks
akaia-shadowfox Dec 15, 2022
fd6b3a7
wip: Move UI segment to the upper level
akaia-shadowfox Dec 16, 2022
52cca6a
wip: Apply code review and naming remarks
akaia-shadowfox Dec 16, 2022
87f4f43
wip: Apply code review and naming remarks
akaia-shadowfox Dec 16, 2022
c05423b
wip: Apply code review and naming remarks
akaia-shadowfox Dec 16, 2022
29c4ad8
wip: Apply code review and naming remarks
akaia-shadowfox Dec 16, 2022
d9f7f41
wip: Format
akaia-shadowfox Dec 16, 2022
512e5b9
fix: Don't wrap error additionally
akaia-shadowfox Dec 18, 2022
147f03c
wip: Apply code review and naming remarks
akaia-shadowfox Dec 18, 2022
037f485
wip: Remove redundant code
akaia-shadowfox Dec 18, 2022
b7a01a5
wip: Extract NEAR token display amount formatter
akaia-shadowfox Dec 18, 2022
86ddad8
wip: Remove redundant code & Use proper error handling
akaia-shadowfox Dec 18, 2022
75a55f4
wip: Construct MI address using adapter's method
akaia-shadowfox Dec 18, 2022
c751246
wip: Apply code review remarks
akaia-shadowfox Dec 18, 2022
ff2a20d
chore: Format
akaia-shadowfox Dec 19, 2022
2390571
fix: Prevent infinite requests loop in models
akaia-shadowfox Dec 19, 2022
7eebfd1
chore: Use more consistent naming
akaia-shadowfox Dec 19, 2022
ce78635
wip: Fix infinite balances loading
akaia-shadowfox Dec 19, 2022
ccc2c24
wip: Encapsulate providers into Balances widget
akaia-shadowfox Dec 19, 2022
18785da
chore: Format
akaia-shadowfox Dec 19, 2022
127121b
wip: Fix error on job bond editing
akaia-shadowfox Dec 19, 2022
cccdceb
chore: Fix TS error
akaia-shadowfox Dec 21, 2022
fdd1757
chore: Move typings to dev dependencies
akaia-shadowfox Dec 25, 2022
de0424c
feat: Implement validation for settings proposal
akaia-shadowfox Dec 26, 2022
c1dc377
chore: Reuse inferred type ( fix Lennart's OCD )
akaia-shadowfox Dec 26, 2022
c8a1eb0
chore: Format
akaia-shadowfox Dec 26, 2022
760107a
fix: Apply code review and naming remarks & Remove redundant code
akaia-shadowfox Dec 26, 2022
179abc5
chore: Remove unused setting example
akaia-shadowfox Dec 26, 2022
aca1217
Merge branch 'main' of https://github.com/near-multicall/ui into sett…
akaia-shadowfox Dec 28, 2022
2bfbe4a
wip: Fix textfield styles
akaia-shadowfox Jan 4, 2023
1c00d02
feat: Add simple validation for token whitelisting
akaia-shadowfox Jan 5, 2023
6d166c8
chore: Use shorter names
akaia-shadowfox Jan 5, 2023
e5ed732
fix: Capitalize exposed namespace
akaia-shadowfox Jan 5, 2023
b7142a7
fix: Capitalize exposed namespace
akaia-shadowfox Jan 5, 2023
6597771
chore: Remove unused import
akaia-shadowfox Jan 5, 2023
5fea694
fix: Don't try to load jobs if MI isn't ready
akaia-shadowfox Jan 5, 2023
9836843
feat: Enable async validation for token whitelisting
akaia-shadowfox Jan 6, 2023
1ebe0cd
wip: Reorganize & actualize types
akaia-shadowfox Jan 8, 2023
beec237
wip: GIve more space to settings proposal tile
akaia-shadowfox Jan 8, 2023
201d25b
fix: Add TS workaround
akaia-shadowfox Jan 8, 2023
2e2753a
fix: Add more TS workarounds
akaia-shadowfox Jan 8, 2023
faffae0
chore: Remove redundant statements
akaia-shadowfox Jan 8, 2023
07a6b9f
Merge branch 'main' of https://github.com/near-multicall/ui into sett…
akaia-shadowfox Jan 12, 2023
6a670a0
wip: Update Table API & Amend naming
akaia-shadowfox Jan 13, 2023
c7769e3
wip: Use new APIs for scheduling configuration
akaia-shadowfox Jan 13, 2023
018db47
wip: Don't convert initial job bond until bugs are fixed
akaia-shadowfox Jan 13, 2023
f02b0fa
wip: Update styles
akaia-shadowfox Jan 13, 2023
98d79d7
wip: Update compact table styles
akaia-shadowfox Jan 13, 2023
3ef49a5
wip: Update compact table styles
akaia-shadowfox Jan 13, 2023
0e14ab2
wip: Use more minimalistic layout
akaia-shadowfox Jan 13, 2023
1f4420c
Merge branch 'settings-editor-validation' of https://github.com/near-…
akaia-shadowfox Jan 13, 2023
454cb6f
fix: Remove ugly styling
akaia-shadowfox Jan 13, 2023
af8b79c
wip: Amend settings proposal hints
akaia-shadowfox Jan 13, 2023
71eda76
wip: Fix form submission
akaia-shadowfox Jan 13, 2023
deb255d
fix: Resolve circular dependencies & Flatten FS structure
akaia-shadowfox Jan 19, 2023
7e4c9f4
Merge branch 'main' of https://github.com/near-multicall/ui into sett…
akaia-shadowfox Jan 19, 2023
3e98b96
Merge branch 'settings-editor-amendments' of https://github.com/near-…
akaia-shadowfox Jan 19, 2023
0327f0f
fix: Add missing rounded corners
akaia-shadowfox Jan 20, 2023
7a0b3a0
chore: Update branch
akaia-shadowfox Jan 20, 2023
d95326f
chore: Remove obsolete `console.log` calls
akaia-shadowfox Jan 20, 2023
40e3fac
fix: Track job bond reactively
akaia-shadowfox Jan 20, 2023
ad0f315
wip: Move minimal job bond parameter to MI entity
akaia-shadowfox Jan 20, 2023
afcf3e0
fix: Compute MI connection state properly
akaia-shadowfox Jan 20, 2023
4f7be6d
chore: Remove redundant code
akaia-shadowfox Jan 20, 2023
6bf6efa
chore: Remove unused import
akaia-shadowfox Jan 20, 2023
f4b4d30
chore: Remove redundant styling
akaia-shadowfox Jan 20, 2023
cc26594
wip
akaia-shadowfox Jan 21, 2023
733c62e
update minor dep versions, fix failed build
mohamedalichelbi Jan 21, 2023
9cc079d
wip
akaia-shadowfox Jan 21, 2023
b82ea02
Merge branch 'settings-editor-amendments' of https://github.com/near-…
akaia-shadowfox Jan 21, 2023
9c5f81f
Merge branch 'main' of https://github.com/near-multicall/ui into sett…
akaia-shadowfox Jan 21, 2023
74f6f06
chore: Update AccountId type
akaia-shadowfox Jan 21, 2023
851fedf
fix: Use `AccountId = string` for NEAR account ID type everywhere
akaia-shadowfox Jan 21, 2023
a0cd09c
fix: Implement state reset between service inputs updates
akaia-shadowfox Jan 21, 2023
fab3228
Merge branch 'main' of https://github.com/near-multicall/ui into sett…
akaia-shadowfox Jan 21, 2023
6548ac5
fix: Update imports
akaia-shadowfox Jan 21, 2023
63a7a08
wip: Fix imports
akaia-shadowfox Jan 21, 2023
fdb9402
chore: Rename workflow tools pane widget
akaia-shadowfox Jan 23, 2023
e40573f
chore: Format
akaia-shadowfox Jan 23, 2023
25ede10
chore: Propose draft for #189
akaia-shadowfox Jan 24, 2023
9f47bb0
chore: update strucutre
lennczar Jan 24, 2023
2245134
fix: builder styling
lennczar Jan 24, 2023
6a6fd2e
fix: update keywords import
lennczar Jan 24, 2023
628baa6
chore: simplify className assignments
lennczar Jan 31, 2023
3520c0d
chore: Update development setup guide
akaia-shadowfox Feb 3, 2023
e8ba328
Merge branch 'main' of https://github.com/near-multicall/ui into sett…
akaia-shadowfox Feb 3, 2023
f630981
Merge branch 'main' of https://github.com/near-multicall/ui into sett…
akaia-shadowfox Feb 8, 2023
e569e2d
feat: Support jobs with multiple multicalls
akaia-shadowfox Feb 9, 2023
ebb8c32
chore: Format
akaia-shadowfox Feb 9, 2023
f5cedec
fix: Use strings for job bond amount value
akaia-shadowfox Mar 10, 2023
0f1398f
Merge branch 'main' of https://github.com/near-multicall/ui into sett…
akaia-shadowfox Apr 9, 2023
592e880
fix: No point in lazy loading of the root page
akaia-shadowfox Apr 10, 2023
a7e389d
fix: Incorrect proposal creation permission status
akaia-shadowfox Apr 10, 2023
c1ca9f2
Revert "fix: No point in lazy loading of the root page"
mohamedalichelbi Apr 12, 2023
9f112dc
app page ui was renamed to workspace
mohamedalichelbi Apr 12, 2023
f61e0bd
fix: Use correct `ChangeConfig` parameter value
akaia-shadowfox Apr 12, 2023
1dc1a61
Merge branch 'settings-editor-amendments' of https://github.com/near-…
akaia-shadowfox Apr 12, 2023
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
7 changes: 3 additions & 4 deletions .github/ISSUE_TEMPLATE/chore.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Chore
about: Take note of a to-do that has to be addressed
title: ''
labels: 'chore'
assignees: ''

title: ""
labels: "chore"
assignees: ""
---

**What needs to be done?**
Expand Down
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,25 @@ Try it out at [NEAR Mainnet](https://multicall.app) or [NEAR Testnet](https://te

### Development

#### Quick start
#### Initial setup

##### Install dependencies
First, you should install a Node version supported by the project.
If you don't use [asdf](https://asdf-vm.com/), your version manager should be able to utilize `.nvmrc` configuration file.
Otherwise, you need to manage the installation on your own, taking the version from the file.

If you have asdf installed, simply run the following command:

```bash
asdf install
```

And install project dependencies:

```sh
npm install
```

##### Run development server
#### Development server

For **NEAR Testnet**:

Expand Down
14,260 changes: 8,305 additions & 5,955 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,14 @@
"@babel/preset-react": "^7.16.7",
"@netlify/plugin-lighthouse": "^4.0.2",
"@parcel/transformer-sass": "^2.4.1",
"@types/babel__generator": "^7.6.4",
"@types/babel__template": "^7.4.1",
"@types/big.js": "^6.1.5",
"@types/lodash.debounce": "^4.0.7",
"@types/luxon": "^3.0.1",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.6",
"@types/scheduler": "^0.16.2",
"@typescript-eslint/parser": "^5.36.1",
"babel-jest": "^28.0.2",
"env-cmd": "~10.1.0",
Expand Down Expand Up @@ -70,11 +75,6 @@
"@near-wallet-selector/my-near-wallet": "^7.3.0",
"@near-wallet-selector/near-wallet": "^7.3.0",
"@near-wallet-selector/sender": "^7.3.0",
"@types/babel__generator": "^7.6.4",
"@types/babel__template": "^7.4.1",
"@types/luxon": "^3.0.1",
"@types/react": "^18.0.0",
"@types/scheduler": "^0.16.2",
"big.js": "^6.2.1",
"clsx": "^1.2.1",
"cron-parser": "^4.6.0",
Expand Down
45 changes: 45 additions & 0 deletions src/app/global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import { NetworkId } from "@near-wallet-selector/core";
import { Component } from "react";

import { Task, TaskCopy, TaskInfo, Wallet } from "../entities";
import { AppPage } from "../pages/app";
import { Sidebar } from "../widgets";

declare global {
/* Temporary workaround fixing typechecking with assets import */
declare module "*.png";
declare module "*.svg";
declare module "*.jpeg";
declare module "*.jpg";

/**
* Function arguments inference
*/
declare type Arguments<F extends Function> = F extends (...args: infer A) => any ? A : never;

/**
* String encoded number (u128)
*/
declare type U128String = string;

/**
* String encoded number (u64)
*/
declare type U64String = string;

declare type JsonString = string;

/**
* Base64 encoded JSON
*/
declare type Base64String = string;

/**
* NEAR Protocol account ID
*/
declare type AccountId = string;

interface Window {
EXPORT: Component;
}
}
File renamed without changes.
28 changes: 15 additions & 13 deletions src/index.tsx → src/app/index.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
import "@near-wallet-selector/modal-ui/styles.css";
import { lazy, Suspense } from "react";
import ReactDOM from "react-dom";
import { Suspense } from "react";
import { createRoot } from "react-dom/client";
import { HashRouter, Routes, Route, Navigate } from "react-router-dom";

const AppPage = lazy(() => import("./pages/app"));
const DaoPage = lazy(() => import("./pages/dao"));
import { Wallet } from "./entities";
import { DialogsLayer, Sidebar } from "./widgets";
import "./shared/lib/persistent";
import { Wallet } from "../entities";
import { AppPage } from "../pages/app";
import { DAOPage } from "../pages/dao";
import { DialogsLayer, Sidebar } from "../widgets";
import "../shared/lib/persistent";

ReactDOM.render(
<Wallet.SelectorContextProvider>
const appMountPoint = document.querySelector("#root") ?? document.createElement("div");

appMountPoint.setAttribute("id", "root");

createRoot(appMountPoint).render(
<Wallet.ContextProvider>
<HashRouter>
<Routes>
<Route
Expand Down Expand Up @@ -42,15 +46,13 @@ ReactDOM.render(
<>
<Sidebar full={true} />
<Suspense fallback={<div>Loading...</div>}>
<DaoPage />
<DAOPage />
</Suspense>
<DialogsLayer />
</>
}
/>
</Routes>
</HashRouter>
</Wallet.SelectorContextProvider>,

document.querySelector("#root")
</Wallet.ContextProvider>
);
14 changes: 14 additions & 0 deletions src/entities/ft/ft.lib.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Big, formatTokenAmount } from "../../shared/lib/converter";

import { FTParams } from "./ft.params";

export class FTLib {
public static readonly amountToDisplayAmount = (amount: string, decimals: number): string => {
const formattedAmount = formatTokenAmount(amount, decimals),
minimalDisplayAmount = Big("10").pow(-FTParams.FRACTIONAL_PART_LENGTH).toFixed();

return Big(formattedAmount).gt("0") && Big(formattedAmount).lt(minimalDisplayAmount)
? "< " + minimalDisplayAmount
: formatTokenAmount(amount, decimals, FTParams.FRACTIONAL_PART_LENGTH);
};
}
23 changes: 23 additions & 0 deletions src/entities/ft/ft.model.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { FungibleToken } from "../../shared/lib/standards/fungibleToken";

export type FTModel = {
balances: Pick<FungibleToken, "metadata"> & {
account: string;
multicallInstance: string;
total: string;
};
};

export const FTSchema: {
balances: {
data: null | FTModel["balances"][];
error: Error | null;
loading: boolean;
};
} = {
balances: {
data: null,
error: null,
loading: true,
},
};
3 changes: 3 additions & 0 deletions src/entities/ft/ft.params.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export class FTParams {
static FRACTIONAL_PART_LENGTH = 5;
}
75 changes: 75 additions & 0 deletions src/entities/ft/ft.service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
import { createContext, useEffect, useMemo, useState } from "react";

import { Multicall } from "../../shared/lib/contracts/multicall";
import { Big } from "../../shared/lib/converter";
import { FungibleToken } from "../../shared/lib/standards/fungibleToken";

import { FTSchema } from "./ft.model";

export interface IFTService {
accountId: AccountId;
}

export class FTService {
public static readonly BalancesContext = createContext(FTSchema.balances);

private static readonly balancesFetch = async (
{ accountId }: IFTService,
callback: (result: typeof FTSchema.balances) => void
) => {
const miAddress = Multicall.getInstanceAddress(accountId);

/**
* Get LikelyTokens list on account and its Multicall Instance
*/
const [accountLikelyTokensList, miLikelyTokensList] = await Promise.all([
FungibleToken.getLikelyTokenContracts(accountId),
FungibleToken.getLikelyTokenContracts(miAddress),
]);

/* Merge and de-duplicate both token lists */
const likelyTokensAddressesList = [...new Set([...accountLikelyTokensList, ...miLikelyTokensList])];

const likelyTokensList = await Promise.all(
likelyTokensAddressesList.map((address) => FungibleToken.init(address))
);

return callback({
data: await Promise.all(
likelyTokensList
.filter((token) => token.ready === true)
.map(async (token) => {
const [account, multicallInstance] = await Promise.all([
token.ftBalanceOf(accountId),
token.ftBalanceOf(miAddress),
]);

return {
account,
metadata: token.metadata,
multicallInstance,
total: Big(multicallInstance).add(account).toFixed(),
};
})
),

error: null,
loading: false,
});
};

public static readonly useBalancesState = (inputs: IFTService) => {
const [state, stateUpdate] = useState(FTSchema.balances);

useEffect(() => {
stateUpdate(FTSchema.balances);
void FTService.balancesFetch(inputs, stateUpdate);
}, [...Object.values(inputs), stateUpdate]);

useEffect(() => {
state.error instanceof Error && void console.error(state.error);
}, [state.error]);

return useMemo(() => state, [...Object.values(inputs), ...Object.values(state)]);
};
}
41 changes: 41 additions & 0 deletions src/entities/ft/ft.ui.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import Big from "big.js";
import { PropsWithChildren, useContext } from "react";

import { IconLabel, NEARIcon } from "../../shared/ui/design";

import { FTLib } from "./ft.lib";
import { FTService, IFTService } from "./ft.service";

interface FTBalancesProviderProps extends Pick<PropsWithChildren, "children">, IFTService {}

export const FTBalancesProvider = ({ children, ...modelInputs }: FTBalancesProviderProps) => (
<FTService.BalancesContext.Provider value={FTService.useBalancesState(modelInputs)}>
{children}
</FTService.BalancesContext.Provider>
);

interface FTBalancesProps {
nonZeroOnly?: boolean;
}

export const ftBalancesRender = ({ nonZeroOnly = false }: FTBalancesProps) => {
const { data } = useContext(FTService.BalancesContext),
items = nonZeroOnly ? data?.filter(({ total }) => Big(total).gt("0")) : data;

return (
items?.map(({ account, metadata, multicallInstance, total }) => ({
content: [
<IconLabel
icon={metadata.icon ?? <NEARIcon.GenericTokenFilled />}
label={metadata.symbol}
/>,

FTLib.amountToDisplayAmount(multicallInstance, metadata.decimals),
FTLib.amountToDisplayAmount(account, metadata.decimals),
FTLib.amountToDisplayAmount(total, metadata.decimals),
],

id: metadata.symbol,
})) ?? null
);
};
9 changes: 9 additions & 0 deletions src/entities/ft/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { FTService } from "./ft.service";
import { FTParams } from "./ft.params";
import { FTBalancesProvider, ftBalancesRender } from "./ft.ui";

export class FT extends FTParams {
static BalancesContext = FTService.BalancesContext;
static BalancesProvider = FTBalancesProvider;
static balancesRender = ftBalancesRender;
}
15 changes: 0 additions & 15 deletions src/entities/fungible-token/context.ts

This file was deleted.

8 changes: 0 additions & 8 deletions src/entities/fungible-token/index.ts

This file was deleted.

16 changes: 0 additions & 16 deletions src/entities/fungible-token/lib/ft-format.ts

This file was deleted.

Loading