wallet id

This commit is contained in:
CHIEFSOFT\ameye
2023-10-28 15:55:05 -04:00
parent 97fddb70cc
commit a9b508f569
+10
View File
@@ -228,6 +228,16 @@ long WrenchFamilyTransferCredit( CVars in, CVars &out ){
if (retDb2>0)
{
CVars vw;
vw["currency"] = in["currency"];
vw["currency"].set_valid( true );
long wallet_id = CheckWallet(member_id,vw);
if(!wallet_id || wallet_id == 0 ){
out["status"] = "wallet_not_found";
return ret; // no wallet
}
in["curr_balance"] ="0";
long retDb = load_db_record( out, "SELECT amount AS curr_balance FROM members_wallet "
" WHERE member_id = %lu AND currency='%s' AND uid = '%s'", out["recipient"].Long(), out["currency"].c_str(), out["target_wallet"].c_str());
if (retDb > 0 )