thunderbiscuit / devkit-wallet

A demo app for the bitcoindevkit on Android.
https://thunderbiscuit.github.io/devkit-wallet/
Apache License 2.0
28 stars 17 forks source link

Fix bug where Mnemonic type was saved instead of actual mnemonic string #33

Closed tohrxyz closed 1 year ago

tohrxyz commented 1 year ago

In Wallet.kt, function createWallet(), there was a bug when a class Mnemonic was being saved, instead of an object mnemonic of that class.

Mnemonic.toString(), but it should've beenmnemonic.toString()

thunderbiscuit commented 1 year ago

Hey thanks for your first contribution to the Devkit Wallet, and thanks for finding and fixing a bug! Here are a few things I'd need fixed before I merge:

  1. This doesn't solve the issue yet on my end. It's because the method to get the string out of a Mnemonic object is asString() instead of toString(). You can see the docs here.

The error is fixed when using

Repository.saveMnemonic(mnemonic.asString())
  1. I also try to use capitalized commit messages that follow the imperative style. Your commit message would then look like this: Fix bug where Mnemonic type was saved instead of actual mnemonic string.

Cheers! :fire:

tohrxyz commented 1 year ago

Hey, thanks for revision. I made those changes and committed the fixed version. fixed bug while saving mnemonic