-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for custom config #50
base: main
Are you sure you want to change the base?
Add support for custom config #50
Conversation
src/constant.ts
Outdated
indexerUrl: string | undefined = INDEXER_URL | ||
) { | ||
indexerUrl: string | undefined = INDEXER_URL, | ||
custom_config: Config | undefined = CONFIG |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use camelCase, not snake case
src/constant.ts
Outdated
@@ -10,12 +10,19 @@ export const FT_MINIMUM_STORAGE_BALANCE_LARGE = "12500000000000000000000" | |||
export const ONE_YOCTO_NEAR = '0.000000000000000000000001'; | |||
let ENV: string | undefined = ''; | |||
let INDEXER_URL: string | undefined = ''; | |||
let CONFIG: Config | undefined = undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need this for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it should be like the INDEXER_URL, changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok this is needed so it can get no value
src/constant.ts
Outdated
@@ -1,4 +1,4 @@ | |||
import { TokenMetadata } from './types'; | |||
import { Config, TokenMetadata } from './types'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused, please remove
src/ref.ts
Outdated
@@ -21,6 +21,7 @@ import { | |||
TokenMetadata, | |||
FTStorageBalance, | |||
RefFiViewFunctionOptions, | |||
Config, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused, please remove
src/types.ts
Outdated
|
||
export type Config = { | ||
networkId: string; | ||
nodeUrl: string; | ||
walletUrl: string; | ||
WRAP_NEAR_CONTRACT_ID: string; | ||
REF_FI_CONTRACT_ID: string; | ||
REF_TOKEN_ID: string; | ||
indexerUrl: string; | ||
explorerUrl: string; | ||
REF_DCL_SWAP_CONTRACT_ID: string; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused, please remove
@@ -289,7 +288,7 @@ export const WalletSelectorTransactions = ( | |||
}; | |||
}); | |||
|
|||
return { transactions: parsedTransactions } as SignAndSendTransactionsParams; | |||
return { transactions: parsedTransactions }; | |||
}; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure about this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Module '"@near-wallet-selector/core/lib/wallet"' has no exported member 'SignAndSendTransactionsParams'.ts(2305)
It was deleted and I can't run npm install
it with this line:
near/wallet-selector@65ea358#diff-cf1e42785f014c407e1c8f9672f2d13774005ebee6c4b8b65927b56e0f72ecb0L46
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
@@ -289,7 +288,7 @@ export const WalletSelectorTransactions = ( | |||
}; | |||
}); | |||
|
|||
return { transactions: parsedTransactions } as SignAndSendTransactionsParams; | |||
return { transactions: parsedTransactions }; | |||
}; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
GM @shleikes, can we have this functionality available anytime soon? I'm integrating Ref SDK into Potlock's funding stack and we already have our own multi-env configuration which I'd like to map to the SDK config |
No description provided.