[chainmaker]modify Macro text
@@ -107,6 +107,8 @@ BSINT32 BoatWalletCreate(BoatProtocolType protocol_type, const BCHAR *wallet_nam
BUINT8 hashLenDummy;
#endif
+ BoatHlchainmakerWalletConfig *test_ptr = (BoatHlchainmakerWalletConfig*)wallet_config_ptr;
+
/* Check wallet configuration */
if ((wallet_name_str == NULL) && (wallet_config_ptr == NULL))
{
@@ -205,6 +207,7 @@ BSINT32 BoatWalletCreate(BoatProtocolType protocol_type, const BCHAR *wallet_nam
{
memcpy(boatwalletStore_ptr, wallet_config_ptr, wallet_config_size);
wallet_ptr = BoatHlchainmakerWalletInit((BoatHlchainmakerWalletConfig*)wallet_config_ptr, wallet_config_size);
+
if (wallet_ptr != NULL)
{
memcpy(boatwalletStore_ptr + wallet_config_size, &((BoatHlchainmakerWallet*)wallet_ptr)->user_client_info.prikeyCtx, sizeof(BoatWalletPriKeyCtx));
@@ -245,8 +248,9 @@ BSINT32 BoatWalletCreate(BoatProtocolType protocol_type, const BCHAR *wallet_nam
memcpy(&((BoatHlchainmakerWallet*)wallet_ptr)->user_client_info.prikeyCtx, boatwalletStore_ptr + wallet_config_size, sizeof(BoatWalletPriKeyCtx));
}
}
-
g_boat_iot_sdk_context.wallet_list[i].wallet_ptr = wallet_ptr;
+ //printf("liuzhenhe2 = %s", g_boat_iot_sdk_context.wallet_list[i].wallet_ptr->node_info.org_Id);
+
break;
#endif
@@ -481,7 +485,6 @@ BSINT32 BoatWalletCreate(BoatProtocolType protocol_type, const BCHAR *wallet_nam
}
BoatFree(boatwalletStore_ptr);
-
return i;
}
@@ -498,7 +501,6 @@ void BoatWalletUnload(BSINT32 wallet_index)
switch(protocol)
{
-
#if PROTOCOL_USE_ETHEREUM == 1
case BOAT_PROTOCOL_ETHEREUM:
BoatEthWalletDeInit(g_boat_iot_sdk_context.wallet_list[wallet_index].wallet_ptr);
@@ -511,8 +513,8 @@ void BoatWalletUnload(BSINT32 wallet_index)
break;
#endif
- #if PROTOCOL_USE_CHAINMKAER == 1
- case BOAT_PROTOCOL_CHAINMKAER:
+ #if PROTOCOL_USE_CHAINMAKER == 1
+ case BOAT_PROTOCOL_CHAINMAKER:
BoatHlchainmakerWalletDeInit(g_boat_iot_sdk_context.wallet_list[wallet_index].wallet_ptr);
break;
#endif
@@ -564,6 +566,7 @@ void *BoatGetWalletByIndex(BSINT32 wallet_index)
if (g_boat_iot_sdk_context.wallet_list[wallet_index].is_used != BOAT_FALSE &&
g_boat_iot_sdk_context.wallet_list[wallet_index].wallet_ptr != NULL)
{
+
return(g_boat_iot_sdk_context.wallet_list[wallet_index].wallet_ptr);
}
}
