Layout changes - display receive address
This commit is contained in:
@@ -49,7 +49,8 @@ public:
|
||||
_SiaApiError Lock();
|
||||
_SiaApiError Unlock(const String& password);
|
||||
_SiaApiError GetConfirmedBalance(SiaCurrency& balance) const;
|
||||
_SiaApiError GetUnonfirmedBalance(SiaCurrency& balance) const;
|
||||
_SiaApiError GetUnonfirmedBalance(SiaCurrency& balance) const;
|
||||
_SiaApiError GetAddress(String& address) const;
|
||||
};
|
||||
|
||||
class AFX_EXT_CLASS _CSiaRenter
|
||||
|
@@ -157,5 +157,21 @@ SiaApiError CSiaApi::_CSiaWallet::GetUnonfirmedBalance(SiaCurrency& balance) con
|
||||
ret = SiaApiError::Success;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
SiaApiError CSiaApi::_CSiaWallet::GetAddress(String& address) const
|
||||
{
|
||||
SiaApiError ret = SiaApiError::RequestError;
|
||||
address = L"";
|
||||
|
||||
json result;
|
||||
SiaCurlError cerror = _siaCurl.Get(L"/wallet/address", result);
|
||||
if (API_SUCCESS(SiaCurlError, cerror))
|
||||
{
|
||||
address = CA2W(result["address"].get<std::string>().c_str());
|
||||
ret = SiaApiError::Success;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
Reference in New Issue
Block a user