Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

invalid signer or provider #43

Closed
Alisonsilva47 opened this issue Nov 9, 2020 · 1 comment
Closed

invalid signer or provider #43

Alisonsilva47 opened this issue Nov 9, 2020 · 1 comment

Comments

@Alisonsilva47
Copy link

Hello, I'm trying to use a custom provider, but when I test it always gives me this error:

  reason: 'invalid signer or provider',
  code: 'INVALID_ARGUMENT',
  argument: 'signerOrProvider',
  value: '*my_provedor*'

To clear up the doubt, I tried to use information from Mainnet using infura, but the same error continued.

Can anybody help me?

Code:

var par1 = new sdk_1.Token(1, "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", 18);
        var par2 = new sdk_1.Token(1, "0xdac17f958d2ee523a2206206994597c13d831ec7", 6);
        var pair = [await sdk_1.Fetcher.fetchPairData(par1, par2, "xxx")];
        const route = new sdk_1.Route(pair, par2);
        var amountPrecision = Math.round(quant * (10 ** 6));
        const trade = new sdk_1.Trade(route, new sdk_1.TokenAmount(par2, amountPrecision), sdk_1.TradeType.EXACT_INPUT);
        var exec = [trade.executionPrice.toSignificant(6), trade.executionPrice.invert().toSignificant(6)];
        if ((isNaN(exec[0]) || isNaN(exec[1]))) throw 'ERRO 2001';
        return exec;
@moodysalem
Copy link
Contributor

Fetcher has been removed from this repository see #39 (comment)

royalaid pushed a commit to royalaid/qidao-sdk that referenced this issue Mar 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants