From 137aa3e55587d11b48db0ac0abaaf1a38973b23c Mon Sep 17 00:00:00 2001 From: James Chen Date: Sat, 16 Nov 2019 14:42:01 +0800 Subject: [PATCH 1/4] docs: Guide the user to install libsecp256k1 manually since libsecp256k1-dev doesn't have recovery module enabled --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 948034d0..dd803cf1 100644 --- a/README.md +++ b/README.md @@ -13,10 +13,10 @@ Require Ruby 2.4 and above. ### Ubuntu ```bash -sudo apt install libsecp256k1-dev libsodium-dev +sudo apt install libsodium-dev ``` -This SDK depends on the [bitcoin-secp256k1](https://github.com/cryptape/ruby-bitcoin-secp256k1) gem. If you are using Ubuntu 16.04 or below, you might need to install libsecp256k1 with `--enable-module-recovery` (on which bitcoin-secp256k1 depends) manually. Follow [this](https://github.com/cryptape/ruby-bitcoin-secp256k1#prerequisite) to do so. +This SDK depends on the [bitcoin-secp256k1](https://github.com/cryptape/ruby-bitcoin-secp256k1) gem. You need to install libsecp256k1 with `--enable-module-recovery` (on which bitcoin-secp256k1 depends) manually. Follow [this](https://github.com/cryptape/ruby-bitcoin-secp256k1#prerequisite) to do so. ### macOS From e14901bbbde21c17d75546669ab3081e2850af70 Mon Sep 17 00:00:00 2001 From: classicalliu Date: Sun, 17 Nov 2019 10:49:49 +0800 Subject: [PATCH 2/4] fix: add default value for reduce in get_unspent_cells --- lib/ckb/cell_collector.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ckb/cell_collector.rb b/lib/ckb/cell_collector.rb index a9de6c14..d81a3d37 100644 --- a/lib/ckb/cell_collector.rb +++ b/lib/ckb/cell_collector.rb @@ -37,7 +37,7 @@ def get_unspent_cells(lock_hash, need_capacities: nil) break if need_capacities && total_capacities >= need_capacities else results.concat(cells) - total_capacities += cells.map(&:capacity).reduce(:+) + total_capacities += cells.map(&:capacity).reduce(0, :+) break if need_capacities && total_capacities >= need_capacities end current_from = current_to + 1 From b97d20e900c6620056559a11e5d19c77973675e3 Mon Sep 17 00:00:00 2001 From: classicalliu Date: Sun, 17 Nov 2019 11:13:43 +0800 Subject: [PATCH 3/4] chore: bump version to v0.25.1 --- Gemfile.lock | 2 +- lib/ckb/version.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index e74da963..83293290 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - ckb-sdk-ruby (0.25.0) + ckb-sdk-ruby (0.25.1) bitcoin-secp256k1 (~> 0.5.2) net-http-persistent (~> 3.0.0) rbnacl (~> 6.0, >= 6.0.1) diff --git a/lib/ckb/version.rb b/lib/ckb/version.rb index 47fdb391..7499fd24 100644 --- a/lib/ckb/version.rb +++ b/lib/ckb/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module CKB - VERSION = "0.25.0" + VERSION = "0.25.1" end From 149517e70a1c01d02376a183bf5767a254e0ef41 Mon Sep 17 00:00:00 2001 From: classicalliu Date: Sun, 17 Nov 2019 11:15:14 +0800 Subject: [PATCH 4/4] docs: update CHANGELOG for v0.25.1 --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae6b9efa..2756e936 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [v0.25.1](https://github.com/nervosnetwork/ckb-sdk-ruby/compare/v0.25.0...v0.25.1) (2019-11-17) + + +### Bug Fixes + +* add default value for reduce in get_unspent_cells ([e14901b](https://github.com/nervosnetwork/ckb-sdk-ruby/commit/e14901bbbde21c17d75546669ab3081e2850af70)) + + # [v0.25.0](https://github.com/nervosnetwork/ckb-sdk-ruby/compare/v0.24.0...v0.25.0) (2019-11-16)