INNER CODE UNIT · Rust

test_swap_explorer

gemwalletcom/wallet · core/crates/block_explorers/src/lib.rs:189

    fn test_swap_explorer() {
        let near_intents = swap_explorer(SwapProvider::NearIntents, Chain::Near).unwrap();
        let recipient = "aec8de30ed03c5e6f9d0dc90ae39d865f1b4f6f77c990f2ad16c93e873ea67de";
        let input = ExplorerInput {
            recipient: Some(recipient.to_string()),
            memo: Some("48694126".to_string()),
            ..Default::default()
        };

        assert_eq!(
            swap_explorer(SwapProvider::Thorchain, Chain::Thorchain)
                .unwrap()
                .get_swap_tx_url(&"0x0299923c9a0a40e3a296058ac2c5c3a7b41f91803ea36ad9645492ccca0f8631".into()),
            "https://runescan.io/tx/0299923c9a0a40e3a296058ac2c5c3a7b41f91803ea36ad9645492ccca0f8631"
        );
        assert_eq!(
            swap_explorer(SwapProvider::Mayan, Chain::Solana)
                .unwrap()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…