Skip to content
This repository has been archived by the owner on May 13, 2021. It is now read-only.

Add support for substrate following uos #75

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Conversation

amaury1093
Copy link

@amaury1093 amaury1093 commented Jul 18, 2019

  • Add support for substrate. QrSigner now support 2 networks: ethereumLegacy and substrate
  • removed package-lock, used yarn. i ran npm install and got a bunch of access denied stuff, so switched to yarn asap. Maciej tell me if you prefer to stick to package-lock.

@maciejhirsz If I have your green light, I'll start updating docs

Note: to run the example, I did:

yarn build && cp ./dist/* ./example/node_modules/@parity/qr-signer/dist
cd example
yarn start

TODO:

src/QrSigner.js Outdated
};
if (value.error) {
onError && onError(value.error);
return <div style={style}>Error in encoding: {value.error}</div>;
Copy link
Author

Choose a reason for hiding this comment

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

What should we do in case the user inputs a wrong network/payload combo? Right now I'm just showing this ugly div, and also added an onError prop

Copy link
Contributor

Choose a reason for hiding this comment

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

I think that's reasonable, the burden of correctness is on the API consumer (!== end user) in this case.

@Tbaut
Copy link

Tbaut commented Jul 18, 2019

Thank you so much for this PR :)
Actually we switched Parity Signer back to yarn so I'm personnaly totally fine for yarn

'0xd7568e5f0a7eda67a82691ff379ac4bba4f9c9b859fe779b5d46363b61ad2db9'
),
action: 'signTransaction',
crypto: 'ed25519',
Copy link

@jacogr jacogr Jul 18, 2019

Choose a reason for hiding this comment

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

I see this in the spec as well, but really dunno how it is relevant. So, I scan the account, the dapp that has that address couldn't care less if it is ed25519/sr25519 or something else. The signer knows and manages the keys.

So basically, the dapp will only send the data through, the mobile signer can sign it with whichever crypto it has created the account with, the dapp really should not need to know or specify crypto.

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.

4 participants