-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #97 from mycitadel/payto
Initial RGB support
- Loading branch information
Showing
14 changed files
with
789 additions
and
95 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "mycitadel-desktop" | ||
version = "1.3.0" | ||
version = "2.0.0" | ||
authors = ["Dr Maxim Orlovsky <[email protected]>"] | ||
description = "Bitcoin, Lightning and RGB wallet; part of MyCitadel software suite." | ||
repository = "https://github.com/mycitadel/mycitadel-desktop" | ||
|
@@ -68,3 +68,4 @@ serde = ["serde_with", "serde_yaml", | |
|
||
[patch.crates-io] | ||
bpro = { git = "https://github.com/pandora-prime/bpro", branch = "v0.5" } | ||
rgb-std = { git = "https://github.com/RGB-WG/rgb-wallet", branch = "develop" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// MyCitadel desktop wallet: bitcoin & RGB wallet based on GTK framework. | ||
// | ||
// Written in 2022 by | ||
// Dr. Maxim Orlovsky <[email protected]> | ||
// | ||
// Copyright (C) 2022 by Pandora Prime SA, Switzerland. | ||
// | ||
// This software is distributed without any warranty. You should have received | ||
// a copy of the AGPL-3.0 License along with this software. If not, see | ||
// <https://www.gnu.org/licenses/agpl-3.0-standalone.html>. | ||
|
||
use bpro::{OnchainStatus, OnchainTxid}; | ||
|
||
pub trait FormatDate { | ||
fn format_date(&self) -> String; | ||
} | ||
|
||
impl FormatDate for OnchainTxid { | ||
fn format_date(&self) -> String { | ||
match self.status { | ||
OnchainStatus::Blockchain(height) => self | ||
.date_time() | ||
.map(|dt| dt.format("%F %H:%M").to_string()) | ||
.unwrap_or_else(|| format!("{height}")), | ||
OnchainStatus::Mempool => s!("mempool"), | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.