Skip to content

Commit

Permalink
Merge pull request #71 from Cchangyixue/dev
Browse files Browse the repository at this point in the history
update testcase
  • Loading branch information
CoboZhu authored Dec 13, 2023
2 parents 6eddc88 + 8a37bce commit cf6dc0e
Show file tree
Hide file tree
Showing 13 changed files with 385 additions and 510 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
Expand All @@ -40,5 +42,5 @@ jobs:
SECRET: "${{ github.event.inputs.environment == 'prod' && secrets.PRODSECRET || secrets.DEVELOPSECRET}}"
Web3SECRET: "${{secrets.DEVELOPWEB3SECRET}}"
MPCSECRET: "${{secrets.DEVELOPMPCSECRET}}"
run: python test.py --env $ENV --secret $SECRET --web3ApiSecret $Web3SECRET --mpcApiSecret $MPCSECRET
run: python tests/run_test.py --api_secret $SECRET --mpc_api_secret $MPCSECRET

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ venv
/cobo_python_api.egg-info
cobo_custody.egg-info
.DS_Store
__pycache__/
.python-version
.tox
35 changes: 2 additions & 33 deletions cobo_custody/config/__init__.py
Original file line number Diff line number Diff line change
@@ -1,37 +1,6 @@
from cobo_custody.config.env import Env

DEV_ENV = Env(host="https://api.dev.cobo.com",
coboPub="03596da539963fb1dd29d5859e25903eb76b9f7ed2d58516e29c9f80c201ff2c1b")
coboPub="03596da539963fb1dd29d5859e25903eb76b9f7ed2d58516e29c9f80c201ff2c1b")
PROD_ENV = Env(host="https://api.custody.cobo.com",
coboPub="02c3e5bacf436fbf4da78597e791579f022a2e85073ae36c54a361ff97f2811376")

DEV_TEST_DATA = {
"cobo_id": "20220314181458000331767000003732",
"tx_id": "0x1c4d137bc2a2ee8f22cbdf9e90405974e72e65d922f42eb81d9f7a05d0f64fc6",
"withdraw_id": "web_send_by_user_915_1647252768642",
"deposit_address": {"BTC": "3JBYNrbB4bHtGWHTEa3ZPuRK9kwTiEUo4D",
"XRP": "rfKyCMyoV6Ln2GZ7YDbrBrnXCbAyBbxRqB|2047482901"},
"deposit_addresses": {"BTC": "3JBYNrbB4bHtGWHTEa3ZPuRK9kwTiEUo4D,bc1qf22hpu33u2tkyy528mdvpnre45n8lu5s3ycatu",
"XRP": "rfKyCMyoV6Ln2GZ7YDbrBrnXCbAyBbxRqB|2047482901,"
"rfKyCMyoV6Ln2GZ7YDbrBrnXCbAyBbxRqB|3752417374"},
"loop_address": {"BTC": "35eXJPLRTSp4Wn8n2f6pkQF4t3KdU2cuhz",
"XRP": "rfKyCMyoV6Ln2GZ7YDbrBrnXCbAyBbxRqB|477817505"},
"loop_addresses": {"BTC": "35eXJPLRTSp4Wn8n2f6pkQF4t3KdU2cuhz,34R4JHecUwGNEFVGKz1vR8R6BHGi5FUqPt",
"XRP": "rfKyCMyoV6Ln2GZ7YDbrBrnXCbAyBbxRqB|477817505,"
"rfKyCMyoV6Ln2GZ7YDbrBrnXCbAyBbxRqB|2874421071"}
}

PROD_TEST_DATA = {
"cobo_id": "20220311154108000184408000002833",
"tx_id": "4041A888C9966BE8916FE65F2FEE7AE9A9DC3F49D0F1643A768C842CA95FA736",
"withdraw_id": "sdk_request_id_fe80cc5f_1647068483396",
"deposit_address": {"BTC": "36xYx7vf7DUKpJDixpY3EoV2jchFwYSNCb",
"XRP": "rBWpYJhuJWBPAkzJ4kYQqHShSkkF3rgeD|3992922539"},
"deposit_addresses": {"BTC": "36xYx7vf7DUKpJDixpY3EoV2jchFwYSNCb,bc1q0l24tf5sjdu9t7l6hrlhxz9aq9yeej9h2sc7tk",
"XRP": "rBWpYJhuJWBPAkzJ4kYQqHShSkkF3rgeD|3992922539,"
"rBWpYJhuJWBPAkzJ4kYQqHShSkkF3rgeD|1492154866"},
"loop_address": {"BTC": "34WLjtk9ta96BVxc1jRF7j5eVvehoftsVV",
"XRP": "rBWpYJhuJWBPAkzJ4kYQqHShSkkF3rgeD|633829231"},
"loop_addresses": {"BTC": "34WLjtk9ta96BVxc1jRF7j5eVvehoftsVV,33P1kjMfDCKipR58S7XbsCqbmPT5YGrhUo",
"XRP": "rBWpYJhuJWBPAkzJ4kYQqHShSkkF3rgeD|633829231,rBWpYJhuJWBPAkzJ4kYQqHShSkkF3rgeD|935940214"}
}
coboPub="02c3e5bacf436fbf4da78597e791579f022a2e85073ae36c54a361ff97f2811376")
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import setup
setup(
name="cobo_custody",
version="0.32",
version="0.33",
author="Cobo",
author_email="support@cobo.com",
description="Cobo Custody restful api",
Expand Down
Loading

0 comments on commit cf6dc0e

Please sign in to comment.