Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

[Coin-integration] Polkadot #963

Merged
merged 11 commits into from Jan 15, 2021
Merged

[Coin-integration] Polkadot #963

merged 11 commits into from Jan 15, 2021

Conversation

ghost
Copy link

@ghost ghost commented Nov 25, 2020

Full integration of Polkadot.

TODO: description and remaining tasks

@vercel
Copy link

vercel bot commented Nov 25, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/ledgerhq-old/ledger-live-common/p2uotu1yj
✅ Preview: https://ledger-live-co-git-fork-ledger-coin-integration-team-p-b050b1.ledgerhq-old.now.sh

Copy link
Contributor

@gre gre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

giving some first 👀 feedbacks.
overall good job.
BTW i didn't really looked at some of the complex business logic as i'm not qualified on the polkadot logic itself.

src/api/polkadot/bisontrails.js Outdated Show resolved Hide resolved
src/api/polkadot/bisontrails.js Outdated Show resolved Hide resolved
src/api/polkadot/bisontrails.js Outdated Show resolved Hide resolved
src/api/polkadot/bisontrails.js Outdated Show resolved Hide resolved
src/api/polkadot/bisontrails.js Outdated Show resolved Hide resolved
src/api/polkadot/sidecar.js Outdated Show resolved Hide resolved
src/families/polkadot/bridge/js.js Outdated Show resolved Hide resolved
src/families/polkadot/js-estimateMaxSpendable.js Outdated Show resolved Hide resolved
src/families/polkadot/js-signOperation.js Outdated Show resolved Hide resolved
@ghost ghost marked this pull request as ready for review January 12, 2021 13:33
@ghost ghost requested a review from gre January 12, 2021 13:33
src/__tests__/all.libcore.js Outdated Show resolved Hide resolved
src/env.js Outdated Show resolved Hide resolved
Rémi Jarasson (Ext) added 2 commits January 13, 2021 10:33
[Polkadot] feat(bridge): preload staking data and refresh validators if needed

[Polkadot] fix(api): fetch ledger using stash's controller address

[Polkadot] feat(logic): add getters hasExternalXXX

[POLKADOT] fix: check nominate validators differently

[Polkadot] Add poc speculos test (#21)

* [Polkadot] Add poc speculos test

* [Polkadot] update snapshot + loggier

* [Polkadot] remove unlockings fields

[Polkadot] fix reward number / fix env bisontrails

[Polkadot] First implementation of sidecar

[POLKADOT] feat: add sidecar validators & nominations

[Polkadot] snapshot + reward id

fix(Polkadot): use finalizedHead as account blockHeight

COINTEMP-425

[Polkadot] estimate bond unbond rebond (#22)

* [Polkadot] estimate bond unbond rebond

* [Polkadot] warning all funds + fix fees

* [Polkadot] fix prepare transaction fees calculate

* [Polkadot] fix(getTransactionStatus): warn useAllAmount on bond

Co-authored-by: Rémi Jarasson (Ext) <[email protected]>

[Polkadot] fix hw-app : add sw_cancel to receive

[Polkadot] nonce fix (#23)

* [Polkadot] nonce fix

* [Polkadot] use bond loading

* [Polkadot] Bug nonce

fix(Polkadot): trim validator identity + serialize unlocking Date

feat(Polkadot): add isFirstBond logic util

fix(Polkadot): usePolkadotBondLoading bypass sync after 1st bond

[Polkadot] fix: review feedbacks

* [Polkadot] Feedback fixes

* [Polkadot] review's feedback

Polkadot - payout reward (#26)

[Polkadot] preload age

fix(Polkadot): add hasPendingBond to logic

fix(Polkadot): sidecar api call validators w/ comma-separated addresses

fix(Polkadot): fix ws nominations null status + type

[Polkadot] add min version (#29)

Polkadot display dot confirmation screen (#30)

* [Polkadot] device transaction change

* [Polkadot] hw Fix refuse on send

Plug indexer & sidecar to Ledger's staging reverse proxy (#31)

* Plug indexer & sidecar to Ledger's staging reverse proxy

* [Polkadot] remove https unverified

* [Polkadot] remove agent

Co-authored-by: Henri Ly <[email protected]>

[Polkadot] More tests coverage

[Polkadot] update snapshot

[Polkadot] feedback test

[Polkadot] linter fix

[Polkadot] fixing test + regenerate snapshot

Polkadot refacto api (#32)

* [Polkadot] move API folder into families

* [Polkadot] Remove unlocked and regen snapshot

* [Polkadot] linter + import unneccessary

Plug indexer & sidecar to Ledger's production reverse proxy (#33)

[Polkadot] move errors + nomination error

feat(Polkadot): preload - early update election status + add some constants

Actually use PolkadotValidatorsRequired error

fix(Polkadot): Remove use of txWrapper lib (#24)

* Remove txWrapper lib and keep only used methods

* Fix: use account address as stash if no controller specified

* Adapt tx building to polkadot/api v2.7.1

* Split registry-related code in a separate file

* Simplify passing of tx building info accross methods

* Remove useless layer of functions for tx payload construction

* Stop using memoizee lib

* Update package.json to remove dependency to polakdot/api

* Fix: always use account's address as both stash & controller

* Code rework & minor improvements

* fix(Polkadot): refacto without tx wrapper

Co-authored-by: Rémi Jarasson (Ext) <[email protected]>
Co-authored-by: Henri Ly <[email protected]>

fix(Polkadot): improve getTransactionStatus with cache and preload

docs(Polkadot): improved JSDoc & types for api

fix(Polkadot): reorg family struct

fix(Polkadot): cache transaction params and force when signing

fix(Polkadot): preload getRegistry to have it cached

[Polkadot] Fix optimistic + remove 0 from confirmation (#35)

* [Polkadot] Fix optimistic + remove 0 from confirmation

* [Polkadot] Revert hex of nonce

[Polkadot] remove one getNonce in import

[Polkadot] max amount and existantial (#37)

[Polkadot] fix amount with real max value

[Polkadot] fixing display amount et validator stash on rewar

Coin 1191 negative estimate max spendable (#39)

* [COIN-1191] Negative estimate max spendable

* [COIN-1191] add break to switch

Use numSlashingSpans value provided by sidecar instead of hardcoded 0

[Polkadot] add more coverage + fix test-dataspec

fix(Polkadot): ensure amount is in extra even if zero

[COIN-1188] remove TO if not needed

fix(Polkadot): remove unnecessary env and test mock
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants