Skip to content

Commit

Permalink
updating deriv
Browse files Browse the repository at this point in the history
  • Loading branch information
xtruan committed Mar 3, 2023
1 parent 97e3bd2 commit 13d5204
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions views/flipbip39_scene_1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 13d5204

Please sign in to comment.