Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add option to export wallets #1244

Merged
merged 32 commits into from May 29, 2019

Conversation

@dated
Copy link
Contributor

commented May 13, 2019

Proposed changes

Adds the option to export ones wallets, closing #1142.

export_new

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (improve a current implementation without adding a new feature or fixing a bug)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Build (changes that affect the build system)
  • Docs (documentation only changes)
  • Test (adding missing tests or fixing existing tests)
  • Other... Please describe:

Checklist

  • I have read the CONTRIBUTING documentation
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

The exported wallets have the following format:

{
  "network": {
    "name": "ARK Devnet",
    "nethash": "2a44f340d76ffc3df204c5f38cd355b7496c9065a1ade2ef92071436bd72e867",
    "token": "DARK",
    "symbol": "DѦ"
  },
  "wallets": [
    {
      "username": "alessio",
      "address": "DSyG9hK9CE8eyfddUoEvsga4kNVQLdw2ve",
      "publicKey": "033a5474f68f92f254691e93c06a2f22efaf7d66b543a53efcece021819653a200",
      "vote": {
        "username": "dated_test_del",
        "publicKey": "02d2f48a7ebb5b6d484de15b4cab8ab13c1d39b7141301efe048714aa9d82eb1cd"
      },
      "balance": {
        "DARK": "2192334.43948647"
      }
    }
  ]
}
@ArkEcosystemBot

This comment has been minimized.

Copy link
Member

commented May 13, 2019

Thanks for submitting this pull request! A maintainer will review this in the next few days and explicitly select labels so you know what's going on.

If no reviewer appears after a week, a reminder will be sent out.

dated added some commits May 13, 2019

@ArkEcosystemBot

This comment has been minimized.

Copy link
Member

commented May 13, 2019

The ci/circleci: test-node-11 job is failing as of af1dbcf11a30fd740caee3a3b2b68d47d2bc4472. Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

dated added some commits May 13, 2019

@dated dated changed the title [WIP] feat: add option to export wallets feat: add option to export wallets May 14, 2019

@dated

This comment has been minimized.

Copy link
Contributor Author

commented May 14, 2019

any feedback is appreciated @alexbarnsley @j-a-m-l @ItsANameToo

dated added some commits May 14, 2019

@dated dated force-pushed the dated:feat/export-wallets branch from 737ac27 to 2d2b934 May 14, 2019

dated and others added some commits May 14, 2019

@j-a-m-l
Copy link
Contributor

left a comment

@dated you've done a great job.

On the UI there are some things that I'd change:

  • We would need later an import feature, but we're already using that name, so we would have to rename it to "recover" or something similar, or use a different concept for exporting them. Maybe "download" or "save", or something in that line.
  • It's necessary to explain that the file doesn't contain the passphrase, so it can't be used as a backup.

I'd add another option to include the balance and other data of the wallet.

Show resolved Hide resolved src/renderer/components/Modal/ModalExportWallets.vue Outdated
misc: export with whitespace
Co-Authored-By: Juan <j-a-m-l@users.noreply.github.com>
@dated

This comment has been minimized.

Copy link
Contributor Author

commented May 17, 2019

I'll add a notice to the modal regarding the passphrase, for the import a 'Batch Import' button could be added to the import page?

@j-a-m-l

This comment has been minimized.

Copy link
Contributor

commented May 17, 2019

I'm not sure about that option; we could rename the buttons to "Import Wallets", but that page would need a modal to import the wallets and it would break the step style and behaviour of the process, so it wouldn't fit there smoothly.

I'd rather add other button. Maybe "Batch Import", near the "Import Wallet" button is clear enough.

@zillionn

This comment has been minimized.

Copy link
Contributor

commented May 17, 2019

I guess this will be a nice feature when you're switching computers or reinstalling the OS, right? If yes, how about to export the whole Profile with its settings and everything? Then when you install the desktop wallet on the new comp, you'll have an option to import the profile.

@j-a-m-l

This comment has been minimized.

Copy link
Contributor

commented May 17, 2019

Yes, exporting the whole profile could be a feature. In that case it would include data to import the network in case it doesn't exist yet.

@dated

This comment has been minimized.

Copy link
Contributor Author

commented May 21, 2019

The ledger option is now disabled if no ledger is connected and I've added some more fields for now:

  "wallets": [
    {
      "ANoNeeFDFo61XcQBYad6rEbPvfATwgjTNT": {
        "name": "test",
        "publicKey": "02ead78d2ecd00a966f45c1ea3fb8d2e032dcb704a451a1af0426789261d37459a",
        "balance": {
          "ARK": "1780.56728118",
          "USD": "1105.27"
        }
      }
    }
  ]

I'll try to add the remaining fields and some tests tomorrow.

dated added some commits May 22, 2019

@dated

This comment has been minimized.

Copy link
Contributor Author

commented May 23, 2019

I would refrain from the transaction counts for now as the API does return wrong values, and I don't see much use for that information anyway.

The other fields have been added. I removed the address as key and added it as a property. Are you ok with the current format @j-a-m-l?

@ArkEcosystemBot

This comment has been minimized.

Copy link
Member

commented May 23, 2019

Your pull request needs some changes. Please wait for a comment from one of our developers for more information.

@dated

This comment has been minimized.

Copy link
Contributor Author

commented May 23, 2019

Thanks for the review @luciorubeens, I'll get the changes done asap.

dated and others added some commits May 24, 2019

refactor: add active to advanced options and destructuring
Co-Authored-By: Lúcio Rubens <4539235+luciorubeens@users.noreply.github.com>
@dated

This comment has been minimized.

Copy link
Contributor Author

commented May 24, 2019

All fixed, thanks again @luciorubeens.

@ArkEcosystemBot

This comment has been minimized.

Copy link
Member

commented May 24, 2019

A member has approved this PR. A maintainer will merge this PR shortly. If it shouldn't be merged yet, please leave a comment saying so and we'll wait.

Thank you for your contribution!

@luciorubeens luciorubeens requested a review from j-a-m-l May 24, 2019

alexbarnsley and others added some commits May 27, 2019

@ArkEcosystemBot

This comment has been minimized.

Copy link
Member

commented May 29, 2019

A member has approved this PR. A maintainer will merge this PR shortly. If it shouldn't be merged yet, please leave a comment saying so and we'll wait.

Thank you for your contribution!

@j-a-m-l j-a-m-l merged commit 9f4d5ef into ArkEcosystem:develop May 29, 2019

1 check passed

ci/circleci: test-node-11 Your tests passed on CircleCI!
Details
@ArkEcosystemBot

This comment has been minimized.

Copy link
Member

commented May 29, 2019

Your pull request has been merged and marked as tier 0. It needs a specialized, in-depth review before we can decide on its value.

@luciorubeens luciorubeens referenced this pull request May 29, 2019

Closed

Enable CSV export #810

@dated dated deleted the dated:feat/export-wallets branch May 29, 2019

alexbarnsley added a commit that referenced this pull request Jun 26, 2019

chore: merge develop to master (#1304)
* fix: improve validation for epoch format (#1164)

* chore: upgrade Vue and other dependencies and use Node 11 on CI (#1160)

* feat: allow using a pool of background workers and use create a unified HTTP client (#1120)

* fix: `InputSelect` dropdowns (#1174)

* fix: `InputSelect` dropdowns

* refactor: use the new Vue 2.6 syntax for named slots

* fix: do not allow more than 1 `InputSelect` open at the same time

* fix: other network fees when higher than ARK default static fees (#1172)

* fix: main sidebar menus (settings and peers/networks) (#1175)

* fix: the wallet selection dropdown and the wallet sidebar filters (#1184)

* fix: do not fail when navigating to other page while loading transactions (#1185)

* fix: use of getStruct in ledger transactions (#1190)

* chore: add ItsANameToo as code owner

* fix: add network modal validation (#1173)

* fix: network validation being overwritten

* feat: pull active delegates from api

* fix: make sure active delegates value exists

* refactor: improve server regex

* test: network modal for adding network

* chore: replace todo with comment

* fix: use one loop with prefilled values as backup

* refactor: allow string or number for input text

* refactor: allow fetching fees for specific network

* fix: fetch network fees when adding/editing

* fix: fetch fees & wait before add/update

* chore: remove mario from contributors (#1196)

* chore: add Altilly Exchange Wallet (#1199)

* fix: align the add profile placeholder (#1202)

* fix: days on the X axis of the market chart (#1203)

* fix: fetch fees only if the network is available (#1206)

* fix: stop hover from displacing address container (#1242)

* fix: vue-i18n-extract commands (#1247)

* refactor: require user action when generating 2nd passphrase (#1229)

* feat: store sidebar sorting and filters (#1148)

* feat: add option to hide the wallet button text (#1146)

* fix: get children of TransitionGroup when available & word-break of vendorfield (#1234)

* feat: show remaining bytes in vendorfield helper text (#1259)

* chore: use organization-wide GitHub Configuration (#1267)

* misc: Italian language update (#1268)

* fix: tidy permission method names & check exists (#1260)

* feat: add option to export wallets (#1244)

* feat: use the theme colours for the wallet filters instead of white (#1270)

* deps: upgrade `axios` (CVE-2019-10742) (#1271)

* fix: saving of invalid profile name on leave (#1101)

* bugfix: saving of invalid profile editions

* refactor: dont disable save button when profile name valid

even when the 'isNameEditable' don't disable save button. Instead disable it only when the name has an error.

* Update en-US.js

* Update ProfileEdition.vue

* refactor: show failed update message on close

* refactor: add update failure reason

* fix: disable both save buttons if name invalid

* fix: display the wallet sidebar filters on the right position (#1201)

* fix: highlight filters button when expanded if active

* fix: display the wallet sidebar filters on the right position

* refactor: add the status icon and plus/minus sign in the transaction show modal (#1272)

* fix: use webview instead of iframe for changelly (#1277)

* revert: worker changes from commit e42290

* refactor: use nock to mock tests (#1291)

* fix: add options mock requests

* fix: tests not mocking api

* fix: duplicated key warning on `WalletNew`

* Update src/renderer/pages/Wallet/WalletNew.vue

Co-Authored-By: Edgar Goetzendorff <hello@dated.fun>

* fix: ledger options on build (#1300)

* fix: ledger options on build

* fix: use component directly

* fix: change order of arguments in uniqBy call (#1297)

* fix: don't close custom peer modal when clicking inside (#1204)

* refactor: rename `NetworkCustomPeer` to `NetworkCustomPeerModal`

* fix: do not close the custom peer modal when clicking inside it

* refactor: wallet address & balance clickable on WalletAll page (#1301)

* fix: ledger wallet sidebar filter (#1292)

* fix: ledger whitescreen (#1296)

* fix: ledger whitescreen errors

* refactor: all ledger errors are failures

* refactor: improve ledger connection check

* refactor: improve ledger & use hid-singleton

* test: fix failing

* chore: remove e2e tests

* fix: open transaction modal on dashboard (#1281)

* fix: remove deeplink validation prefix

* fix: open transaction modal on dashboard

* fix: don't switch twice when selecting wallet on WalletSidebar (#1302)

* chore: bump version to 2.5.0 (#1303)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.