|
|
@@ -162,15 +162,19 @@ static void flipbip39_scene_1_model_init(FlipBip39Scene1Model* const model, cons
|
|
|
const size_t buflen = 128;
|
|
|
char buf[buflen + 1];
|
|
|
//HDNode node;
|
|
|
- uint32_t fingerprint;
|
|
|
+ uint32_t fingerprint = 0;
|
|
|
+ hdnode_serialize_private(root, fingerprint, version_private, buf, buflen);
|
|
|
+ char *xprvroot = malloc(22 + 1);
|
|
|
+ strncpy(xprvroot, buf, 22);
|
|
|
+ model->seed2 = xprvroot;
|
|
|
// external chain
|
|
|
for (int chain = 0; chain < 2; chain++) {
|
|
|
//QTableWidget *list = chain == 0 ? ui->listAddress : ui->listChange;
|
|
|
HDNode *node = root;
|
|
|
- hdnode_private_ckd(node, 44 | 0x80000000);
|
|
|
- hdnode_private_ckd(node, 0 | 0x80000000); // bitcoin
|
|
|
- hdnode_private_ckd(node, (arg1 - 1) | 0x80000000);
|
|
|
+ //hdnode_private_ckd_prime(node, 44);
|
|
|
+ //hdnode_private_ckd_prime(node, 0 | 0x80000000); // bitcoin
|
|
|
fingerprint = hdnode_fingerprint(node);
|
|
|
+ hdnode_private_ckd_prime(node, (arg1 - 1));
|
|
|
hdnode_serialize_private(node, fingerprint, version_private, buf, buflen);
|
|
|
char *xprv = malloc(22 + 1);
|
|
|
strncpy(xprv, buf, 22);
|