feat: tip frame (sign/verify/encode/decode), wallet balance + receive address, F6 wallet screen with QR, dispatch Kind::Tip
This commit is contained in:
parent
7b147d8ebe
commit
10d81964a5
10 changed files with 511 additions and 24 deletions
|
|
@ -205,6 +205,16 @@ impl Wallet {
|
|||
Ok(out)
|
||||
}
|
||||
|
||||
/// Monero-wallet-rpc `get_balance`, account_index 0. Returns the "balance"
|
||||
/// field as a piconero string on success; the caller can format it with
|
||||
/// `pay::atomic_to_xmr_str` if it wants a human-readable form.
|
||||
pub async fn get_balance(&self) -> Result<String> {
|
||||
let v = self
|
||||
.rpc("get_balance", serde_json::json!({"account_index": 0}))
|
||||
.await?;
|
||||
json_str(&v, "balance")
|
||||
}
|
||||
|
||||
async fn rpc(&self, method: &str, params: serde_json::Value) -> Result<serde_json::Value> {
|
||||
let ep = self
|
||||
.endpoint
|
||||
|
|
|
|||
Loading…
Reference in a new issue