[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated: use the first part on the fir
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated: use the first part on the first part and the second part on the second part |
Date: |
Tue, 19 Apr 2022 14:58:00 +0200 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository wallet-core.
The following commit(s) were added to refs/heads/master by this push:
new b90a4a66 use the first part on the first part and the second part on
the second part
b90a4a66 is described below
commit b90a4a66dcb1a7a037a6dafee6d10a63fbacf345
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Tue Apr 19 09:57:52 2022 -0300
use the first part on the first part and the second part on the second part
---
packages/taler-util/src/bitcoin.ts | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/packages/taler-util/src/bitcoin.ts
b/packages/taler-util/src/bitcoin.ts
index b5cafbba..0dd83e2d 100644
--- a/packages/taler-util/src/bitcoin.ts
+++ b/packages/taler-util/src/bitcoin.ts
@@ -38,6 +38,10 @@ function buf2hex(buffer: Uint8Array) {
.join("");
}
+const hext2buf = (hexString: string) =>
+ new Uint8Array(hexString.match(/.{1,2}/g)!.map(byte => parseInt(byte, 16)));
+
+
export function generateFakeSegwitAddress(
reservePub: string,
addr: string,
@@ -55,11 +59,9 @@ export function generateFakeSegwitAddress(
first_part.set(first_rnd, 0);
first_part.set(pub.subarray(0, 16), 4);
const second_part = new Uint8Array(first_rnd.length + pub.length / 2);
- second_part.set(first_rnd, 0);
+ second_part.set(second_rnd, 0);
second_part.set(pub.subarray(16), 4);
- console.log(first_part.length, second_part.length);
-
const prefix =
addr[0] === "t" && addr[1] == "b"
? "tb"
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-wallet-core] branch master updated: use the first part on the first part and the second part on the second part,
gnunet <=