Skip to content

Commit

Permalink
update to v0.2.2 (#20)
Browse files Browse the repository at this point in the history
* update from cryptogarageinc v0.2.11

Co-authored-by: k-matsuzawa <[email protected]>
  • Loading branch information
ko-matsu and k-matsuzawa authored Dec 1, 2020
1 parent 766bbda commit 0c050ca
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 68 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/check_pre-merge_develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
with:
node-version: ${{ matrix.node }}
- name: update to npm v7
if: matrix.os == 'windows-latest'
if: runner.os == 'Windows'
run: npm i -g npm@7
- name: dump node version
id: node_ver
Expand All @@ -67,7 +67,7 @@ jobs:
npm --version
echo "::set-output name=temp_npm_cachedir::$(npm config get cache)"
- name: use npm cache
if: matrix.os != 'windows-latest' && steps.node_cache.outputs.cache-hit != 'true'
if: runner.os != 'Windows' && steps.node_cache.outputs.cache-hit != 'true'
uses: actions/cache@v1
id: npm_cache
with:
Expand All @@ -92,7 +92,7 @@ jobs:
- name: elements_example
run: npm run elements_example
- name: lint_check
if: matrix.os != 'macos-latest'
if: runner.os != 'macOS'
run: npm run lint_all
- name: after_job
run: rm -rf node_modules/cfd-js
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/check_pre-merge_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
with:
node-version: ${{ matrix.node }}
- name: update to npm v7
if: matrix.os == 'windows-latest'
if: runner.os == 'Windows'
run: npm i -g npm@7
- name: dump node version
id: node_ver
Expand All @@ -65,7 +65,7 @@ jobs:
npm --version
echo "::set-output name=temp_npm_cachedir::$(npm config get cache)"
- name: use npm cache
if: matrix.os != 'windows-latest' && steps.node_cache.outputs.cache-hit != 'true'
if: runner.os != 'Windows' && steps.node_cache.outputs.cache-hit != 'true'
uses: actions/cache@v1
id: npm_cache
with:
Expand All @@ -90,7 +90,7 @@ jobs:
- name: elements_example
run: npm run elements_example
- name: lint_check
if: matrix.os != 'macos-latest'
if: runner.os != 'macOS'
run: npm run lint_all
- name: after_job
run: rm -rf node_modules/cfd-js
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/check_pre-merge_sprint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
with:
node-version: ${{ matrix.node }}
- name: update to npm v7
if: matrix.os == 'windows-latest'
if: runner.os == 'Windows'
run: npm i -g npm@7
- name: dump node version
id: node_ver
Expand All @@ -69,7 +69,7 @@ jobs:
npm --version
echo "::set-output name=temp_npm_cachedir::$(npm config get cache)"
- name: use npm cache
if: matrix.os != 'windows-latest' && steps.node_cache.outputs.cache-hit != 'true'
if: runner.os != 'Windows' && steps.node_cache.outputs.cache-hit != 'true'
uses: actions/cache@v1
id: npm_cache
with:
Expand All @@ -94,7 +94,7 @@ jobs:
- name: elements_example
run: npm run elements_example
- name: lint_check
if: matrix.os != 'macos-latest'
if: runner.os != 'macOS'
run: npm run lint_all
- name: after_job
run: rm -rf node_modules/cfd-js
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/create_release-and-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:
run: npm install
timeout-minutes: 20
- name: prebuild
run: npm run prebuild_all
run: npm run prebuild_napi
- name: prebuild upload
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -180,7 +180,7 @@ jobs:
run: npm install
timeout-minutes: 20
- name: prebuild
run: npm run prebuild_all
run: npm run prebuild_napi
- name: prebuild upload
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -245,7 +245,7 @@ jobs:
run: npm install
timeout-minutes: 20
- name: prebuild
run: npm run prebuild_all
run: npm run prebuild_napi
- name: prebuild upload
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions addon/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ message(STATUS "[CMAKE_JS_INC]=${CMAKE_JS_INC}")
if(NOT napi_build_version)
add_compile_definitions(NAPI_VERSION=3)
else()
message(STATUS "[napi_build_version]=${napi_build_version}")
add_compile_definitions(NAPI_VERSION=${napi_build_version})
endif()

Expand Down
2 changes: 1 addition & 1 deletion external/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ if(CFD_TARGET_VERSION)
set(CFD_TARGET_TAG ${CFD_TARGET_VERSION})
message(STATUS "[external project local] cfd target=${CFD_TARGET_VERSION}")
else()
set(CFD_TARGET_TAG v0.2.1)
set(CFD_TARGET_TAG v0.2.2)
endif()
if(CFD_TARGET_URL)
set(CFD_TARGET_REP ${CFD_TARGET_URL})
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cfd-js",
"version": "0.2.1",
"version": "0.2.2",
"domain": "p2pderivatives",
"repository": {
"type": "git",
Expand All @@ -13,7 +13,6 @@
},
"binary": {
"napi_versions": [
2,
3
]
},
Expand All @@ -31,12 +30,14 @@
"types": "index.d.ts",
"gypfile": false,
"scripts": {
"install": "prebuild-install --verbose || run-s install_cmake",
"install": "prebuild-install --runtime napi --verbose || run-s install_cmake",
"install_cmake": "run-s download_object cmake_install_configure cmake_compile",
"prebuild_all_local": "run-s cmake_clean_all download_object prebuild_all",
"prebuild_all_local": "run-s cmake_clean_all download_object prebuild_napi",
"old_prebuild_all_local": "run-s cmake_clean_all download_object prebuild_all",
"prebuild_all": "run-s prebuild_nodejs prebuild_electron",
"prebuild_nodejs": "prebuild --backend cmake-js -t 15.1.0 -t 14.3.0 -t 12.16.3 -t 10.20.1 -r node --verbose --include-regex \".*(node|a|so|dll|dylib)$\" -- -O build --CDENABLE_SHARED=off --CDENABLE_CAPI=off --CDENABLE_TESTS=off --CDENABLE_JS_WRAPPER=off --CDTARGET_RPATH=\"@executable_path;/usr/local/lib;/usr/local/lib64;\\$\\$ORIGIN/node_modules/cfd-js/build/Release;\\$ORIGIN/node_modules/cfd-js/build/Release;\\$ORIGIN/../node_modules/cfd-js/build/Release;\\$ORIGIN/../../node_modules/cfd-js/build/Release;\\$ORIGIN/../../../node_modules/cfd-js/build/Release;\\$ORIGIN/../../../../node_modules/cfd-js/build/Release;\\$ORIGIN/../../../../../node_modules/cfd-js/build/Release;\\$ORIGIN/../../../../../../node_modules/cfd-js/build/Release;\\$ORIGIN/build/Release;\\$ORIGIN/wrap_js/dl_lib/lib\" -C --CDnapi_build_version=3",
"prebuild_electron": "prebuild --backend cmake-js -t 12.0.0-beta.1 -t 11.0.0-beta.11 -t 10.0.0-beta.1 -t 9.0.0 -t 8.0.0 -t 7.0.0 -r electron --verbose --include-regex \".*(node|a|so|dll|dylib)$\" -- -O build --CDENABLE_SHARED=off --CDENABLE_CAPI=off --CDENABLE_TESTS=off --CDENABLE_JS_WRAPPER=off --CDTARGET_RPATH=\"@executable_path;/usr/local/lib;/usr/local/lib64;\\$\\$ORIGIN/node_modules/cfd-js/build/Release;\\$ORIGIN/node_modules/cfd-js/build/Release;\\$ORIGIN/../node_modules/cfd-js/build/Release;\\$ORIGIN/../../node_modules/cfd-js/build/Release;\\$ORIGIN/../../../node_modules/cfd-js/build/Release;\\$ORIGIN/../../../../node_modules/cfd-js/build/Release;\\$ORIGIN/../../../../../node_modules/cfd-js/build/Release;\\$ORIGIN/../../../../../../node_modules/cfd-js/build/Release;\\$ORIGIN/build/Release;\\$ORIGIN/wrap_js/dl_lib/lib\" -C --CDnapi_build_version=3",
"prebuild_nodejs": "prebuild --backend cmake-js -t 15.1.0 -t 14.3.0 -t 12.16.3 -t 10.20.1 -r node --verbose --include-regex \".*(node|a|so|dll|dylib)$\" -- -O build --CDENABLE_SHARED=off --CDENABLE_CAPI=off --CDENABLE_TESTS=off --CDENABLE_JS_WRAPPER=off --CDTARGET_RPATH=\"@executable_path;/usr/local/lib;/usr/local/lib64;\\$\\$ORIGIN/node_modules/cfd-js/build/Release;\\$ORIGIN/node_modules/cfd-js/build/Release;\\$ORIGIN/../node_modules/cfd-js/build/Release;\\$ORIGIN/../../node_modules/cfd-js/build/Release;\\$ORIGIN/../../../node_modules/cfd-js/build/Release;\\$ORIGIN/../../../../node_modules/cfd-js/build/Release;\\$ORIGIN/../../../../../node_modules/cfd-js/build/Release;\\$ORIGIN/../../../../../../node_modules/cfd-js/build/Release;\\$ORIGIN/build/Release;\\$ORIGIN/wrap_js/dl_lib/lib\" -C",
"prebuild_electron": "prebuild --backend cmake-js -t 12.0.0-beta.1 -t 11.0.0-beta.11 -t 10.0.0-beta.1 -t 9.0.0 -t 8.0.0 -t 7.0.0 -r electron --verbose --include-regex \".*(node|a|so|dll|dylib)$\" -- -O build --CDENABLE_SHARED=off --CDENABLE_CAPI=off --CDENABLE_TESTS=off --CDENABLE_JS_WRAPPER=off --CDTARGET_RPATH=\"@executable_path;/usr/local/lib;/usr/local/lib64;\\$\\$ORIGIN/node_modules/cfd-js/build/Release;\\$ORIGIN/node_modules/cfd-js/build/Release;\\$ORIGIN/../node_modules/cfd-js/build/Release;\\$ORIGIN/../../node_modules/cfd-js/build/Release;\\$ORIGIN/../../../node_modules/cfd-js/build/Release;\\$ORIGIN/../../../../node_modules/cfd-js/build/Release;\\$ORIGIN/../../../../../node_modules/cfd-js/build/Release;\\$ORIGIN/../../../../../../node_modules/cfd-js/build/Release;\\$ORIGIN/build/Release;\\$ORIGIN/wrap_js/dl_lib/lib\" -C",
"prebuild_napi": "prebuild --backend cmake-js -r napi --verbose --include-regex \".*(node|a|so|dll|dylib)$\" -- -O build --CDENABLE_SHARED=off --CDENABLE_CAPI=off --CDENABLE_TESTS=off --CDENABLE_JS_WRAPPER=off --CDTARGET_RPATH=\"@executable_path;/usr/local/lib;/usr/local/lib64;\\$\\$ORIGIN/node_modules/cfd-js/build/Release;\\$ORIGIN/node_modules/cfd-js/build/Release;\\$ORIGIN/../node_modules/cfd-js/build/Release;\\$ORIGIN/../../node_modules/cfd-js/build/Release;\\$ORIGIN/../../../node_modules/cfd-js/build/Release;\\$ORIGIN/../../../../node_modules/cfd-js/build/Release;\\$ORIGIN/../../../../../node_modules/cfd-js/build/Release;\\$ORIGIN/../../../../../../node_modules/cfd-js/build/Release;\\$ORIGIN/build/Release;\\$ORIGIN/wrap_js/dl_lib/lib\" -C",
"prebuild_upload_all": "prebuild --upload-all",
"check_version": "node ./tools/checker.js version",
"download_object": "node ./pkg_getter.js",
Expand Down
5 changes: 2 additions & 3 deletions src/cfdapi_select_utxos_wrapper_json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ void SelectUtxosWrapRequest::PostDeserialize() {
auto ite2 = json_target_list.cbegin();
const auto& ite_end2 = json_target_list.cend();
while (ite2 != ite_end2) {
map_target_amount_.insert(std::make_pair(
ite2->GetAsset(), Amount::CreateBySatoshiAmount(ite2->GetAmount())));
map_target_amount_.emplace(ite2->GetAsset(), ite2->GetAmount());
++ite2;
}
}
Expand Down Expand Up @@ -106,7 +105,7 @@ void SelectUtxosWrapResponse::SetSelectedAmountMap(
for (const auto& selected_amount : map_selected_amount) {
TargetAmountMapData selected_amount_data;
selected_amount_data.SetAsset(selected_amount.first);
selected_amount_data.SetAmount(selected_amount.second.GetSatoshiValue());
selected_amount_data.SetAmount(selected_amount.second);
json_selected_list.push_back(selected_amount_data);
}
}
Expand Down
2 changes: 0 additions & 2 deletions tools/autogen.sh

This file was deleted.

20 changes: 0 additions & 20 deletions tools/cleanup.sh

This file was deleted.

5 changes: 2 additions & 3 deletions tools/cmake_cleanup.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ if exist "cmake_cleanup.bat" (
cd ..
)

rmdir /S /Q wrap_js\build
rmdir /S /Q build

rmdir /S /Q wrap_js\dl_lib

rmdir /S /Q wrap_js\wally.js

rmdir /S /Q external\cfd

rmdir /S /Q external\cfd-core

rmdir /S /Q external\libwally-core

rmdir /S /Q external\googletest
3 changes: 1 addition & 2 deletions tools/cmake_cleanup.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#!/bin/sh
cd `git rev-parse --show-toplevel`

rm -rf wrap_js/build
rm -rf build
rm -rf wrap_js/dl_lib
rm -f wrap_js/wally.js
rm -rf external/cfd
rm -rf external/cfd-core
rm -rf external/libwally-core
Expand Down
18 changes: 0 additions & 18 deletions tools/re-create.sh

This file was deleted.

0 comments on commit 0c050ca

Please sign in to comment.