liusong1111 / synapse-extension

MIT License
0 stars 0 forks source link

[ui] export mnemonic page 2 #31

Open liusong1111 opened 4 years ago

liusong1111 commented 4 years ago

https://github.com/rebase-network/synapse-extension/blob/bb8fc827adca2ab2281480dd068858d1882ccbf4/src/ui/pages/ExportMnemonic/index.tsx#L100-L104

          history.push('/export-mnemonic-second');
          chrome.runtime.sendMessage({
            message,
            type: MESSAGE_TYPE.EXPORT_MNEONIC_SECOND,
          });

Puzzled by the two statements execution sequence. what if line 1 succeeded and line 2 is ignored? what if line 2 succeed while line 1 still pending and missing the message?

may be a better way is place content of page 2 to page 1:

page1 && <Page1 /> || page2 && <Page2 />

PRD question

BTW, does exprt mnemonic and export private key make sence and is regular to wallet? why not export keystore?

Export private key has the same question

liusong1111 commented 4 years ago

https://github.com/rebase-network/synapse-extension/blob/bb8fc827adca2ab2281480dd068858d1882ccbf4/src/ui/pages/MnemonicSetting/index.tsx#L59

the same