Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
montera82 committed Sep 6, 2023
1 parent f4f7946 commit 6aa07ce
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/snap/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@celo/gas-snap",
"version": "0.5.6-alpha.1",
"version": "0.5.6-alpha.2",
"description": "A MetaMask snap for sending Celo transactions with alternate gas currencies",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions packages/snap/snap.manifest.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"version": "0.5.6-alpha.1",
"version": "0.5.6-alpha.2",
"description": "An example Snap written in TypeScript.",
"proposedName": "Celo Gas Snap",
"repository": {
"type": "git",
"url": "https://github.com/celo-org/gas-snap.git"
},
"source": {
"shasum": "813VSdbqA0zMg8GLCTRFQqTR2G0jZJzjr3HZveLX344=",
"shasum": "6aOtQKHS3CanzoiGnYkCskSTCs6h7nG3uBFKS7I8m98=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
8 changes: 5 additions & 3 deletions packages/snap/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,11 @@ export const onRpcRequest: OnRpcRequestHandler = async ({ request }) => {
],
placeholder: `cusd, ceur, creal, celo`,
});
if(overrideFeeCurrency === '') {
overrideFeeCurrency = suggestedFeeCurrency
if (overrideFeeCurrency === '') {
overrideFeeCurrency = suggestedFeeCurrency;
}
if ( VALID_CURRENCIES.includes(overrideFeeCurrency.toLowerCase()) ) {

if (VALID_CURRENCIES.includes(overrideFeeCurrency.toLowerCase())) {
tx.feeCurrency = getFeeCurrencyAddressFromName(
overrideFeeCurrency.toLowerCase(),
network.name,
Expand All @@ -117,6 +118,7 @@ export const onRpcRequest: OnRpcRequestHandler = async ({ request }) => {
`${network.explorer}/tx/${txReceipt?.transactionHash}`,
],
});
// eslint-disable-next-line consistent-return
return txReceipt?.transactionHash;
} catch (e) {
const message = (e as Error).message.includes('insufficient funds')
Expand Down

0 comments on commit 6aa07ce

Please sign in to comment.