-
Notifications
You must be signed in to change notification settings - Fork 2
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
Bug fixes discovered during testing. #40
base: main
Are you sure you want to change the base?
Conversation
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.
the gasLimit + tx.value should not be added together as they are different units of measurement
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
} | ||
|
||
console.log('tx.feeCurrency', tx.feeCurrency); |
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.
looks like a debug log
const network = await getNetworkConfig(); | ||
const provider = new CeloProvider(network.url); | ||
const keyPair = await getKeyPair(snap, tx.from); | ||
const wallet = new CeloWallet(keyPair.privateKey).connect(provider); | ||
tx.from = tx.from ? tx.from : wallet.address; |
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.
not sure why this line was added.
If tx.from
does not exist, than wallet
cannot be generated, since keypair
is using tx.from
If tx.from
could in some cases be missing, should there be a check before line 44 that tx.from
actually exist?
export const REJECTION_MESSAGE = 'User rejected the request'; | ||
export const INVALID_CURRENCY_MESSAGE = 'Invalid Currency'; | ||
export const INSUFFICIENT_FUNDS_MESSAGE = `Insufficient funds for the provided gas currency to complete the operation. Please try again using another currency.`; | ||
export const VALID_CURRENCIES = ['cusd', 'ceur', 'creal', 'celo']; |
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.
NIT: It's usually been convention to write these currencies in uppercase.
Fixes celo-org/celo-monorepo#10495