zilliqa 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zilliqa/account/transaction.rb +2 -2
- data/lib/zilliqa/util/bech32.rb +1 -1
- data/lib/zilliqa/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2e68ee2e4e69d1c0c93e6723d39bc5549baecb33fd2c1b13b21d3827a6952f0
|
4
|
+
data.tar.gz: 1938fcd56f64bb14551e850b2a7cc3a6c09fccebef7c96f7a8c4f3d9ede62881
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ae93f97617af3b6aa08d92b3455e603cc7a5bb7bf4144d488977aa827366727dd24d70c9cb8a45be7621fdd2c5fb30791c313dc94ece44c93c6c4443a48666e
|
7
|
+
data.tar.gz: 5183ced2ae3ad7ca70fbc4de6edbdceff8412933be44369d4dafb493bec732aead61206759a71425f07457c794d046ba304416cb6870db3c77816d427a605d58
|
@@ -57,7 +57,7 @@ module Zilliqa
|
|
57
57
|
protocol = Zilliqa::Proto::ProtoTransactionCoreInfo.new
|
58
58
|
protocol.version = version.to_i
|
59
59
|
protocol.nonce = nonce.to_i
|
60
|
-
protocol.toaddr = Util.decode_hex(
|
60
|
+
protocol.toaddr = Util.decode_hex(Util::Bech32.to_checksum_address(to_addr).downcase.sub('0x', ''))
|
61
61
|
protocol.senderpubkey = Zilliqa::Proto::ByteArray.new(data: Util.decode_hex(sender_pub_key))
|
62
62
|
|
63
63
|
raise StandardLengthError if amount.to_i > MAX_BIGINT_BYTES
|
@@ -75,7 +75,7 @@ module Zilliqa
|
|
75
75
|
{
|
76
76
|
version: version.to_i,
|
77
77
|
nonce: nonce.to_i,
|
78
|
-
toAddr:
|
78
|
+
toAddr: Util::Bech32.to_checksum_address(to_addr),
|
79
79
|
amount: amount.to_s,
|
80
80
|
pubKey: sender_pub_key,
|
81
81
|
gasPrice: gas_price.to_s,
|
data/lib/zilliqa/util/bech32.rb
CHANGED
@@ -21,7 +21,7 @@ module Zilliqa
|
|
21
21
|
|
22
22
|
ret = Bitcoin::Bech32.convert_bits(data[1], from_bits: 5, to_bits: 8, pad: false)
|
23
23
|
|
24
|
-
|
24
|
+
to_checksum_address(Util.encode_hex(ret.pack('c*'))).sub('0x', '')
|
25
25
|
end
|
26
26
|
|
27
27
|
# to_checksum_address
|
data/lib/zilliqa/version.rb
CHANGED