Skip to content

Commit

Permalink
fix various issues
Browse files Browse the repository at this point in the history
  • Loading branch information
fleandrei committed Jan 10, 2025
1 parent c80cf26 commit 2aa82f8
Showing 6 changed files with 7 additions and 45 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -78,6 +78,4 @@ docs
# Playwright tests results
test-extension/playwright-tests/playwright-report

test-extension/runner.js // TODO must implement MassaStationAccount.executeSC first
it.skip('executeSC', async () => {
});
test-extension/runner.js
37 changes: 1 addition & 36 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -60,8 +60,7 @@
"bs58check": "^4.0.0",
"buffer": "^6.0.3",
"eventemitter3": "^5.0.1",
"lodash.isequal": "^4.5.0",
"path": "^0.12.7"
"lodash.isequal": "^4.5.0"
},
"devDependencies": {
"@babel/preset-env": "^7.22.14",
2 changes: 1 addition & 1 deletion src/bearbyWallet/BearbyAccount.ts
Original file line number Diff line number Diff line change
@@ -261,7 +261,7 @@ export class BearbyAccount implements Provider {
try {
const fee = Number(params.fee ?? (await this.minimalFee()));
const maxCoins =
params.maxCoins ||
params.maxCoins ??
StorageCost.smartContract(params.byteCode.length) + params.coins;

const args = {
4 changes: 2 additions & 2 deletions src/massaStation/MassaStationAccount.ts
Original file line number Diff line number Diff line change
@@ -273,9 +273,9 @@ export class MassaStationAccount implements Provider {
try {
const args = params.parameter ?? new Uint8Array();
const parameters = args instanceof Uint8Array ? args : args.serialize();
const coins = params.coins || 0n; // If coins is undefined, some vesions of station will have a panic
const coins = params.coins ?? 0n; // If coins is undefined, some vesions of station will have a panic
const maxCoins =
params.maxCoins ||
params.maxCoins ??
StorageCost.smartContract(params.byteCode.length) + coins;
const fee = params.fee || (await this.minimalFee());

2 changes: 1 addition & 1 deletion src/metamaskSnap/MetamaskAccount.ts
Original file line number Diff line number Diff line change
@@ -229,7 +229,7 @@ export class MetamaskAccount implements Provider {
deployParams.fee = params.fee.toString();
}
if (params.maxCoins) {
deployParams.maxCoins = params.maxCoins?.toString();
deployParams.maxCoins = params.maxCoins.toString();
}

const { operationId } = await deploySC(this.provider, deployParams);

0 comments on commit 2aa82f8

Please sign in to comment.