mirror of
https://github.com/aljazceru/cdk.git
synced 2026-01-08 15:35:35 +01:00
refactor(bindings): remove payment method enum
This commit is contained in:
@@ -2,7 +2,6 @@ pub mod blind_signature;
|
||||
pub mod blinded_message;
|
||||
pub mod currency_unit;
|
||||
pub mod mint_proofs;
|
||||
pub mod payment_method;
|
||||
pub mod premint;
|
||||
pub mod proof;
|
||||
pub mod token;
|
||||
@@ -10,7 +9,6 @@ pub mod witness;
|
||||
|
||||
pub use blinded_message::JsBlindedMessage;
|
||||
pub use currency_unit::JsCurrencyUnit;
|
||||
pub use payment_method::JsPaymentMethod;
|
||||
pub use premint::{JsPreMint, JsPreMintSecrets};
|
||||
pub use proof::JsProof;
|
||||
pub use token::JsToken;
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
use cdk::nuts::PaymentMethod;
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
#[wasm_bindgen(js_name = PaymentMethod)]
|
||||
pub enum JsPaymentMethod {
|
||||
Bolt11,
|
||||
}
|
||||
|
||||
impl From<PaymentMethod> for JsPaymentMethod {
|
||||
fn from(inner: PaymentMethod) -> JsPaymentMethod {
|
||||
match inner {
|
||||
PaymentMethod::Bolt11 => JsPaymentMethod::Bolt11,
|
||||
PaymentMethod::Custom(_) => todo!(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<JsPaymentMethod> for PaymentMethod {
|
||||
fn from(inner: JsPaymentMethod) -> PaymentMethod {
|
||||
match inner {
|
||||
JsPaymentMethod::Bolt11 => PaymentMethod::Bolt11,
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user