Added desc to monero txs
This commit is contained in:
@@ -50,4 +50,7 @@ impl MoneroInvoice {
|
||||
pub fn add_amount(self, amount: Decimal) -> Self {
|
||||
self.set_query_part("tx_amount", &amount.to_string())
|
||||
}
|
||||
pub fn add_description(self, desc: &str) -> Self {
|
||||
self.set_query_part("tx_description", desc)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,8 @@ fn create_and_print_qr_invoice(invoice: impl CryptoInvoice) {
|
||||
|
||||
fn main() {
|
||||
let monero_donation_adress = "888tNkZrPN6JsEgekjMnABU4TBzc2Dt29EPAvkRxbANsAnjyPbb3iQ1YBRk1UXcdRsiKc9dhwMVgN5S9cQUiyoogDavup3H".to_string();
|
||||
let monero_invoice =
|
||||
MoneroInvoice::new(&monero_donation_adress).add_amount(Decimal::new(200, 2));
|
||||
let monero_invoice = MoneroInvoice::new(&monero_donation_adress)
|
||||
.add_amount(Decimal::new(200, 2))
|
||||
.add_description("Testing!");
|
||||
create_and_print_qr_invoice(monero_invoice);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user