-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
411d67e
commit ae06427
Showing
5 changed files
with
65 additions
and
44 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
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,11 @@ | ||
[package] | ||
name = "pocketclient-mock" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[lib] | ||
name = "pocketclient" | ||
|
||
[dependencies] | ||
perro = { git = "https://github.com/getlipa/perro", tag = "v1.2.0" } | ||
pocketclient = { path = "../../pocketclient" } |
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,41 @@ | ||
pub use pocketclient::{FiatTopupInfo, Result}; | ||
use std::future::Future; | ||
|
||
pub struct PocketClient {} | ||
|
||
impl PocketClient { | ||
pub fn new(_pocket_url: String) -> Result<Self> { | ||
Ok(PocketClient {}) | ||
} | ||
|
||
pub async fn register_pocket_fiat_topup<S, Fut>( | ||
&self, | ||
_user_iban: &str, | ||
_user_currency: String, | ||
_node_pubkey: String, | ||
_sign_message: S, | ||
) -> Result<FiatTopupInfo> | ||
where | ||
S: FnOnce(String) -> Fut, | ||
Fut: Future<Output = Option<String>>, | ||
{ | ||
Ok(FiatTopupInfo { | ||
order_id: "Mock order_id".to_string(), | ||
debitor_iban: "Mock debitor_iban".to_string(), | ||
creditor_reference: "Mock creditor_reference".to_string(), | ||
creditor_iban: "Mock creditor_iban".to_string(), | ||
creditor_bank_name: "Mock creditor_bank_name".to_string(), | ||
creditor_bank_street: "Mock creditor_bank_street".to_string(), | ||
creditor_bank_postal_code: "Mock creditor_bank_postal_code".to_string(), | ||
creditor_bank_town: "Mock creditor_bank_town".to_string(), | ||
creditor_bank_country: "Mock creditor_bank_country".to_string(), | ||
creditor_bank_bic: "Mock creditor_bank_bic".to_string(), | ||
creditor_name: "Mock creditor_name".to_string(), | ||
creditor_street: "Mock creditor_street".to_string(), | ||
creditor_postal_code: "Mock creditor_postal_code".to_string(), | ||
creditor_town: "Mock creditor_town".to_string(), | ||
creditor_country: "Mock creditor_country".to_string(), | ||
currency: "Mock currency".to_string(), | ||
}) | ||
} | ||
} |
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