Skip to content

Commit

Permalink
revert metadata to fn
Browse files Browse the repository at this point in the history
  • Loading branch information
borngraced committed Jan 3, 2025
1 parent 7124b4f commit 2243c9d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions mm2src/kdf_walletconnect/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use error::WalletConnectError;
use futures::channel::mpsc::{unbounded, UnboundedReceiver};
use futures::StreamExt;
use inbound_message::{process_inbound_request, process_inbound_response, SessionMessageType};
use metadata::{generate_metadata, AUTH_TOKEN_DURATION, AUTH_TOKEN_SUB, METADATA, PROJECT_ID, RELAY_ADDRESS};
use metadata::{generate_metadata, AUTH_TOKEN_DURATION, AUTH_TOKEN_SUB, PROJECT_ID, RELAY_ADDRESS};
use mm2_core::mm_ctx::{from_ctx, MmArc};
use mm2_err_handle::prelude::*;
use pairing_api::PairingClient;
Expand Down Expand Up @@ -116,7 +116,7 @@ impl WalletConnectCtx {
client,
pairing,
relay,
metadata: METADATA,
metadata: generate_metadata(),
key_pair: SymKeyPair::new(),
session_manager: SessionManager::new(storage),
pending_requests: Default::default(),
Expand Down
16 changes: 10 additions & 6 deletions mm2src/kdf_walletconnect/src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ pub(crate) const AUTH_TOKEN_SUB: &str = "http://127.0.0.1:8000";
pub(crate) const AUTH_TOKEN_DURATION: Duration = Duration::from_secs(5 * 60 * 60);
pub(crate) const APP_NAME: &str = "Komodefi Framework";
pub(crate) const APP_DESCRIPTION: &str = "WallectConnect Komodefi Framework Playground";
pub(crate) const METADATA: Metadata = Metadata {
description: APP_DESCRIPTION.to_owned(),
url: AUTH_TOKEN_SUB.to_owned(),
icons: vec!["https://avatars.githubusercontent.com/u/21276113?s=200&v=4".to_owned()],
name: APP_NAME.to_owned(),
};

#[inline]
pub(crate) fn generate_metadata() -> Metadata {
Metadata {
description: APP_DESCRIPTION.to_owned(),
url: AUTH_TOKEN_SUB.to_owned(),
icons: vec!["https://avatars.githubusercontent.com/u/21276113?s=200&v=4".to_owned()],
name: APP_NAME.to_owned(),
}
}

0 comments on commit 2243c9d

Please sign in to comment.