-
Notifications
You must be signed in to change notification settings - Fork 17
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
feat(sui): request tokens from faucet only if recipient balance is below a specific amount #385
Conversation
…is below a specific amount
|
||
if (balance >= Number(options.minBalance)) { | ||
printWarn('Wallet balance above minimum, skipping faucet request'); | ||
process.exit(0); |
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.
should return from this method and not exit the whole process
|
||
const coins = await client.getBalance({ owner: keypair.toSuiAddress() }); | ||
async function printWalletInfo(wallet, client, chain, options) { | ||
const owner = |
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.
walletAddress perhaps instead of owner
const coins = await client.getBalance({ owner: keypair.toSuiAddress() }); | ||
async function printWalletInfo(wallet, client, chain, options) { | ||
const owner = | ||
wallet instanceof Ed25519Keypair || wallet instanceof Secp256k1Keypair || wallet instanceof Secp256r1Keypair |
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.
is there a base KeyPair class?
No description provided.