LtbLightning / bdk-flutter

Bitcoin Development Kit - Flutter Package
MIT License
60 stars 27 forks source link

.toString() methods of Mnemonic and Descriptor return objects, not strings #51

Closed danielnordh closed 1 year ago

danielnordh commented 1 year ago

Using Mnemonic.toString() and Descriptor.toString() doesn't work as they both return objects instead of Strings.

Example with Mnemonic:

Mnemonic.create(WordCount.Words12).then((mnemonic) {
   final mstring = mnemonic.toString(); // This is still "Instance of 'Mnemonic'", not the mnemonic as String
});
danielnordh commented 1 year ago

Solved by using .asString() instead.

BitcoinZavior commented 1 year ago

Added issue to track this https://github.com/LtbLightning/bdk-flutter/issues/53