Change wallet api to the latest version 622
@@ -1015,7 +1015,8 @@ def sdk_pool_name():
def sdk_wallet_data():
w_name = "wallet_name_" + randomText(13)
sdk_wallet_credentials = '{"key": "key"}'
- yield w_name, sdk_wallet_credentials
+ sdk_wallet_config = json.dumps({"id": w_name})
+ yield sdk_wallet_config, sdk_wallet_credentials
w_dir = os.path.join(os.path.expanduser("~/.indy_client/wallet"), w_name)
if os.path.isdir(w_dir):
shutil.rmtree(w_dir, ignore_errors=True)
@@ -1041,17 +1042,16 @@ def sdk_pool_handle(looper, txnPoolNodeSet, tdirWithPoolTxns, sdk_pool_name):
logger.debug("Unhandled exception: {}".format(e))
-async def _gen_wallet_handler(pool_name, wallet_data):
- wallet_name, wallet_credentials = wallet_data
- await create_wallet(pool_name, wallet_name, None, None, wallet_credentials)
- wallet_handle = await open_wallet(wallet_name, None, wallet_credentials)
+async def _gen_wallet_handler(wallet_data):
+ wallet_config, wallet_credentials = wallet_data
+ await create_wallet(wallet_config, wallet_credentials)
+ wallet_handle = await open_wallet(wallet_config, wallet_credentials)
return wallet_handle
@pytest.fixture(scope='module')
-def sdk_wallet_handle(looper, sdk_pool_name, sdk_wallet_data):
- wallet_handle = looper.loop.run_until_complete(
- _gen_wallet_handler(sdk_pool_name, sdk_wallet_data))
+def sdk_wallet_handle(looper, sdk_wallet_data):
+ wallet_handle = looper.loop.run_until_complete(_gen_wallet_handler(sdk_wallet_data))
yield wallet_handle
looper.loop.run_until_complete(close_wallet(wallet_handle))
