Commit Graph

775 Commits

Author SHA1 Message Date
jordansexton e8fae316f8 more refactoring 2021-07-02 11:49:08 -05:00
jordansexton 10a6a5d5cb Merge branch 'main' into lending/xcl 2021-07-01 21:00:09 -05:00
jordansexton dde74ae889 more ui refactoring after views removed 2021-07-01 20:59:37 -05:00
jordansexton 944758b7d7 refactor after lib move 2021-07-01 20:59:12 -05:00
jordansexton 682c1ed967 models and instructions extracted to lib 2021-07-01 20:57:55 -05:00
jordansexton dce8607986 remove broken views 2021-07-01 20:56:04 -05:00
jordansexton b4255eab7e update deps, add @solana/spl-token-lending 2021-07-01 20:53:53 -05:00
Sebastian Bor 778265c0d6
Governance: future proofing for v2 (#124)
* chore: update Governance account

* chore: update Proposal account

* chore: Update ProposalInstruction account

* chore: Update Realm account

* chore: update TokenOwnerRecord account

* fix: add spill address to upgrade instruction

* fix: display units for hold up time

* chore: update program id
2021-07-01 12:21:55 +01:00
Sebastian Bor 7f60b40d7a
Governance: Change slots to timestamps (#123)
* feat: use timestamps instead of slots

* feat: show amount of deposited tokens
2021-06-30 12:36:24 +01:00
jordansexton 8898bb5bc0 fix setter name 2021-06-28 20:59:56 -05:00
jordansexton fd483919a3 obligations view 2021-06-28 20:59:49 -05:00
jordansexton 6fcbdf1a51 handle new obligations 2021-06-28 20:59:19 -05:00
jordansexton effeeeb867 check for reserves, obligations also have a lendingMarket pubkey 2021-06-28 20:58:49 -05:00
jordansexton 9cbb9ddb1c wallet.info.account doesn't exist 2021-06-28 20:58:06 -05:00
jordansexton 16ad2b13e6 obligation init working 2021-06-28 20:57:54 -05:00
jordansexton 5719ae9301 make route components consistent 2021-06-28 17:01:53 -05:00
jordansexton 230582dd5b add flashloan placeholder 2021-06-28 17:01:39 -05:00
jordansexton 05571e50da fix compilation 2021-06-28 17:01:30 -05:00
Sebastian Bor e60ce1b307
Governance: Create token governance (#122)
* feat: implement TokenGovernance

* feat: use governance badge on GovernanceView

* feat: add accounts descriptions to governance items
2021-06-26 18:58:29 +01:00
jordansexton 64f7ee3195 Merge branch 'main' into lending/xcl 2021-06-25 17:12:35 -05:00
jordansexton 9d8ad541fd [WIP] fix borrowing 2021-06-25 17:07:03 -05:00
jordansexton ce889d9094 shorthand object literals 2021-06-25 17:06:44 -05:00
jordansexton 1256f4e076 fix dex market 2021-06-25 17:06:01 -05:00
jordansexton 11d8ba6047 fix pyth subscription 2021-06-25 17:04:59 -05:00
jordansexton b865087de8 remove old pyth hook 2021-06-25 17:04:21 -05:00
jordansexton 0027e7d5af add devnet tokens from mango 2021-06-25 17:03:42 -05:00
jordansexton aeadf50cd5 refresh reserves and obligation as needed 2021-06-25 17:03:23 -05:00
Sebastian Bor ac8d8e21c0
Governance: Create mint instruction (#121)
* feat: setup CreateMintInstruction

* fix: change instruction and enum layout to avoid braking changes
2021-06-25 22:09:00 +01:00
Maximilian Schneider 3db71073f7
fix import case (#119) 2021-06-25 20:49:48 +01:00
Sebastian Bor dd22e823f0
Governance: support mints with large supply (#120)
* fix: add GenericAccountParser to account validator lookup

* fix: do not use cache for accounts validation

* fix: correct deposit/withdraw actions notifications

* fix: update all actions notifications to show transaction link

* fix: display vote scores for large mint supplies

* fix: accept u64 for approve amount

* fix: check for number type to do coercion

* fix: make deposit and withdraw working with large token amounts

* fix: make new proposal working with large token amounts

* fix: make proposal view working with large token amounts

* fix: fix voter table links and vote weight
2021-06-25 18:39:14 +01:00
jordansexton f811d7a4d0 working on fixing dex market init 2021-06-22 19:13:01 -05:00
jordansexton 4580be5514 fixing config 2021-06-22 19:12:40 -05:00
jordansexton f39b03ef1f fixing pubkeys 2021-06-22 19:12:17 -05:00
Sebastian Bor 988d1f72d4
Governance: actions UI feedback (#118)
* chore: create RealmBadge component

* chore: constrain account type

* feat: create mintFormItem with validator

* feat: validate RegisterRealm form

* fix: use correct link in tx error link

* fix: handle transaction errors

* chore: create ModalFormAction componet

* chore: use ModalFormAction for RegisterRealm

* feat: use ModalFormAction to register governance

* fix: use account validator for governed account input

* feat: use ModalFormAction for AddNewProposal action

* chore: code cleanup
2021-06-19 19:30:23 +01:00
jordansexton 29b352aec3 update serum, buffer-layout deps 2021-06-18 15:22:47 -05:00
jordansexton 258a01cf88 Merge branch 'main' into lending/xcl 2021-06-18 15:17:45 -05:00
jordansexton 99783c00db add placeholders for lending program ids 2021-06-18 15:17:21 -05:00
jordansexton c2b1dc3ee9 remove unused import 2021-06-18 14:01:53 -05:00
jordansexton e751324b2a use oyster/common from file 2021-06-18 14:01:44 -05:00
jordansexton 47697063a4 add pyth program id 2021-06-18 14:01:28 -05:00
jordansexton b95301d94b remove bad connections 2021-06-18 14:01:04 -05:00
jordansexton 33a3fa3e09 don't parse liquidity oracle as dex market 2021-06-17 18:40:23 -05:00
jordansexton 9827db6801 pyth context + refactor 2021-06-17 18:40:06 -05:00
jordansexton dfc05c4acb revise fixme comments 2021-06-17 16:39:44 -05:00
jordansexton 30e26bad5b mintPubkey is defined 2021-06-17 16:39:32 -05:00
jordansexton b013894451 add pyth client + hook 2021-06-17 16:39:15 -05:00
Sebastian Bor 4c4d0bfd9c
Governance: lazy account loading (#117)
* chore: load Realms and Governances using rpc

* fix: use bas64 encoding to get accounts

* chore: load governances on demand

* chore: remove legacy GovernanceVotingRecord

* chore: remove governances from context

* chore: remove proposals from ctx

* fix: ensure updates are also filtered using filters

* chore: use useGovernanceAccountsByFilter for Governances

* chore: use useGovernanceAccountsByFilter for useTokenOwnerRecords

* chore: remove tokenOwnerRecords from ctx

* chore: remove signatory records and proposal instructions from ctx

* chore: remove vote records from ctx

* chore: request realms only to get all realms accounts

* chore: use changeTracker to react to account removals

* chore: update comments
2021-06-17 17:53:01 +01:00
jordansexton 4a5362b880 fix all typescript and lint errors 2021-06-15 18:45:35 -05:00
jordansexton 86ed2f1e5e sort exports 2021-06-15 17:58:55 -05:00
jordansexton 934cf0679d todos 2021-06-15 17:58:48 -05:00