Skip to content

Inject supported chains list #1525

Open
Open
@MantisClone

Description

@MantisClone

Problem

The Request Network SDK has a supported chains allowlist list baked into it. This allowlist is used by the request-cleint.js, payment-processor, and payment-detection packages.

Creating / paying / detecting balances on other chains is not supported.

Proposed Solution

Make the chains list injectable into the payment detectors and the RequestNetwork object.

const requestNetwork = new RequestNetwork({
  decryptionProvider,
  signatureProvider,
  currencyManager,
  chains,
  // if no compatible balance detector is found, the balance will be null. 
  balanceDetectors: [
    new EvmTheGraphBalanceDetector(chains, currencyManager),
    new NearTheGraphBalanceDetector(chains),
    new BtcBalanceDetector(),
    new SolanaBalanceDetector(),
    new SuperfluidBalanceDetector(chains),
    // ...
  ]
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    🎫 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions