Skip to content

Commit

Permalink
Add PaymentRuntime::chains for listing all chain-ids
Browse files Browse the repository at this point in the history
  • Loading branch information
kamirr authored and scx1332 committed Oct 9, 2023
1 parent d3058cb commit b60e273
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/erc20_payment_lib/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,10 @@ impl PaymentRuntime {
pub fn network_name(&self, chain_id: i64) -> Option<&str> {
self.get_chain(chain_id).map(|chain| chain.network.as_str())
}

pub fn chains(&self) -> Vec<i64> {
self.setup.chain_setup.keys().copied().collect()
}
}

pub async fn remove_last_unsent_transactions(
Expand Down

0 comments on commit b60e273

Please sign in to comment.