Skip to content

error  #80

@abolfazlMKazemi

Description

@abolfazlMKazemi

i use this code but get error
"
E/flutter ( 2251): Bad state: Too few elements
E/flutter ( 2251): #0 _TypedListBase.setRange (dart:typed_data-patch/typed_data_patch.dart:125:11)
E/flutter ( 2251): #1 _IntListMixin.setRange (dart:typed_data-patch/typed_data_patch.dart)
E/flutter ( 2251): #2 HDPrivateKey._deriveChildPrivateKey (package:dartsv/src/hdprivatekey.dart:202:15)
E/flutter ( 2251): #3 HDPrivateKey.deriveChildKey (package:dartsv/src/hdprivatekey.dart:143:19)
E/flutter ( 2251): #4 WalletDatasource.generateHdAddressFromNemonic. (package:zixowallet/data/datasources/wallet.datasource.dart:221:26)
E/flutter ( 2251): #5 _delayEntrypointInvocation. (dart:isolate-patch/isolate_patch.dart:300:17)
E/flutter ( 2251): #6 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
E/flutter ( 2251): [ERROR:flutter/runtime/dart_isolate.cc(1097)] Unhandled exception:
"

and my code is
print(
"type is ${type} and index is ${index} and address is m/44/236/0/${type}/${index}");

    print("vvvvvvvvvvvvvvvvvvvv ${hdPrivateKey}");

    HDPrivateKey derivedKey =
        hdPrivateKey.deriveChildKey('m/44/236/0/${type}/${index}');//this line has error

and value in log console is
I/flutter ( 2251): type is 1 and index is 39 and address is m/44/236/0/1/39
I/flutter ( 2251): vvvvvvvvvvvvvvvvvvvv tprv8ZgxMBicQKsPdArVcmqsQPUJJHZbuXZjL59bGVKCkkiUbjjEyfZbZW7Xx6Nx3JKXVMtaNj9968A3EiE

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions