Skip to content

Commit

Permalink
Merge pull request #2644 from SelfKeyFoundation/release
Browse files Browse the repository at this point in the history
Release 1.9.15
  • Loading branch information
andregoncalves authored Sep 24, 2021
2 parents 8330313 + eacf1af commit 3a7318b
Show file tree
Hide file tree
Showing 13 changed files with 38 additions and 32 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "selfkey-identity-wallet",
"productName": "SelfKey Identity Wallet",
"version": "1.9.14",
"version": "1.9.15",
"description": "The Official SelfKey Identity Wallet for Desktop",
"browser": [
"chrome"
Expand Down
2 changes: 1 addition & 1 deletion src/common/contract/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ const operations = {
.ethGasStationInfo.average;
}

// TODO: suggestedMaxFeePerGas
// TODO: suggestedMaxPriorityFeePerGas

await dispatch(
contractActions.updateEditorAction({
Expand Down
7 changes: 4 additions & 3 deletions src/common/eth-gas-station/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ export const getEthGasStationInfoWEI = ({ ethGasStationInfo }) => {
export const getEthFeeInfo = ({ ethGasStationInfo }) => ethGasStationInfo.ethGasStationInfo.fees;
export const getEthFeeInfoWEI = ({ ethGasStationInfo }) => {
return {
medium: ethGasStationInfo.ethGasStationInfo.fees.medium.suggestedMaxFeePerGas * GWEI,
high: ethGasStationInfo.ethGasStationInfo.fees.high.suggestedMaxFeePerGas * GWEI,
low: ethGasStationInfo.ethGasStationInfo.fees.low.suggestedMaxFeePerGas * GWEI
medium:
ethGasStationInfo.ethGasStationInfo.fees.medium.suggestedMaxPriorityFeePerGas * GWEI,
high: ethGasStationInfo.ethGasStationInfo.fees.high.suggestedMaxPriorityFeePerGas * GWEI,
low: ethGasStationInfo.ethGasStationInfo.fees.low.suggestedMaxPriorityFeePerGas * GWEI
};
};
24 changes: 12 additions & 12 deletions src/common/marketplaces/marketplaces.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,19 @@ describe('marketplace selectors', () => {
fast: 7000,
safeLow: 2000,
fees: {
low: { suggestedMaxFeePerGas: 1 },
medium: { suggestedMaxFeePerGas: 2 },
high: { suggestedMaxFeePerGas: 3 }
low: { suggestedMaxPriorityFeePerGas: 1 },
medium: { suggestedMaxPriorityFeePerGas: 2 },
high: { suggestedMaxPriorityFeePerGas: 3 }
}
},
feePriceEstimates: {
avarage: 5000,
fast: 7000,
safeLow: 2000,
fees: {
low: { suggestedMaxFeePerGas: 1 },
medium: { suggestedMaxFeePerGas: 2 },
high: { suggestedMaxFeePerGas: 3 }
low: { suggestedMaxPriorityFeePerGas: 1 },
medium: { suggestedMaxPriorityFeePerGas: 2 },
high: { suggestedMaxPriorityFeePerGas: 3 }
}
},
gasPrice: 3000,
Expand Down Expand Up @@ -134,19 +134,19 @@ describe('marketplace selectors', () => {
fast: 7000,
safeLow: 2000,
fees: {
low: { suggestedMaxFeePerGas: 1 },
medium: { suggestedMaxFeePerGas: 2 },
high: { suggestedMaxFeePerGas: 3 }
low: { suggestedMaxPriorityFeePerGas: 1 },
medium: { suggestedMaxPriorityFeePerGas: 2 },
high: { suggestedMaxPriorityFeePerGas: 3 }
}
});
sinon.stub(ethGasStationInfoSelectors, 'getEthFeeInfoWEI').returns({
avarage: 5000,
fast: 7000,
safeLow: 2000,
fees: {
low: { suggestedMaxFeePerGas: 1 },
medium: { suggestedMaxFeePerGas: 2 },
high: { suggestedMaxFeePerGas: 3 }
low: { suggestedMaxPriorityFeePerGas: 1 },
medium: { suggestedMaxPriorityFeePerGas: 2 },
high: { suggestedMaxPriorityFeePerGas: 3 }
}
});
sinon.stub(fiatCurrencySelectors, 'getFiatCurrency').returns('USD');
Expand Down
3 changes: 2 additions & 1 deletion src/common/transaction/operations.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ export const setTransactionFee = (newAddress, newAmount, newGasPrice, newGasLimi
if (!transaction.maxPriorityFee) {
maxPriorityFee = Number(
parseFloat(
state.ethGasStationInfo.ethGasStationInfo.fees.medium.suggestedMaxFeePerGas
state.ethGasStationInfo.ethGasStationInfo.fees.medium
.suggestedMaxPriorityFeePerGas
).toFixed(2)
);
} else {
Expand Down
6 changes: 3 additions & 3 deletions src/common/transaction/operations.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ const getStoreMock = (transaction = {}) =>
average: 200,
fast: 300,
fees: {
low: { suggestedMaxFeePerGas: 1 },
medium: { suggestedMaxFeePerGas: 2 },
high: { suggestedMaxFeePerGas: 3 }
low: { suggestedMaxPriorityFeePerGas: 1 },
medium: { suggestedMaxPriorityFeePerGas: 2 },
high: { suggestedMaxPriorityFeePerGas: 3 }
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/did/create-did-popup-container.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class CreateDIDPopupContainerComponent extends PureComponent {
const gasPrice = ethGasStationInfo ? ethGasStationInfo.average : 50;
const maxPriorityFee =
ethGasStationInfo && ethGasStationInfo.fees && ethGasStationInfo.fees.medium
? parseFloat(ethGasStationInfo.fees.medium.suggestedMaxFeePerGas)
? parseFloat(ethGasStationInfo.fees.medium.suggestedMaxPriorityFeePerGas)
: 1;
const ethFee = EthUnits.toEther((gasPrice + maxPriorityFee) * gasLimit, 'gwei');
const usdFee = ethFee * ethRate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class BankAccountsCheckoutContainer extends MarketplaceBankAccountsComponent {
const gasPrice = ethGasStationInfo ? ethGasStationInfo.average : 50;
const maxPriorityFee =
ethGasStationInfo && ethGasStationInfo.fees && ethGasStationInfo.fees.medium
? parseFloat(ethGasStationInfo.fees.medium.suggestedMaxFeePerGas)
? parseFloat(ethGasStationInfo.fees.medium.suggestedMaxPriorityFeePerGas)
: 1;
const price = jurisdiction.price;
const keyAmount = price / keyRate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class IncorporationsCheckoutContainer extends MarketplaceIncorporationsComponent
const gasPrice = ethGasStationInfo ? ethGasStationInfo.average : 50;
const maxPriorityFee =
ethGasStationInfo && ethGasStationInfo.fees && ethGasStationInfo.fees.medium
? parseFloat(ethGasStationInfo.fees.medium.suggestedMaxFeePerGas)
? parseFloat(ethGasStationInfo.fees.medium.suggestedMaxPriorityFeePerGas)
: 1;
const price = program.price;
const keyAmount = price / keyRate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class MarketplaceKeyFiCheckoutContainerComponent extends MarketplaceKeyFiCompone
const gasPrice = ethGasStationInfo ? ethGasStationInfo.average : 50;
const maxPriorityFee =
ethGasStationInfo && ethGasStationInfo.fees && ethGasStationInfo.fees.medium
? parseFloat(ethGasStationInfo.fees.medium.suggestedMaxFeePerGas)
? parseFloat(ethGasStationInfo.fees.medium.suggestedMaxPriorityFeePerGas)
: 1;
const price = product.price;
const ethPrice = price;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class RequestNotarizationContainer extends MarketplaceNotariesComponent {
const gasPrice = ethGasStationInfo ? ethGasStationInfo.average : 50;
const maxPriorityFee =
ethGasStationInfo && ethGasStationInfo.fees && ethGasStationInfo.fees.medium
? parseFloat(ethGasStationInfo.fees.medium.suggestedMaxFeePerGas)
? parseFloat(ethGasStationInfo.fees.medium.suggestedMaxPriorityFeePerGas)
: 1;
const gasLimit = FIXED_GAS_LIMIT_PRICE;
const gasEthFee = EthUnits.toEther((gasPrice + maxPriorityFee) * gasLimit, 'gwei');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class PassportsCheckoutContainerComponent extends MarketplacePassportsComponent
const gasPrice = ethGasStationInfo ? ethGasStationInfo.average : 50;
const maxPriorityFee =
ethGasStationInfo && ethGasStationInfo.fees && ethGasStationInfo.fees.medium
? parseFloat(ethGasStationInfo.fees.medium.suggestedMaxFeePerGas)
? parseFloat(ethGasStationInfo.fees.medium.suggestedMaxPriorityFeePerGas)
: 1;

const price = program.price;
Expand Down
14 changes: 9 additions & 5 deletions src/renderer/transaction/send/components/transaction-fee-box.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ export class TransactionFeeBoxComponent extends PureComponent {
return;
}
const maxPriorityFee = parseFloat(
this.props.ethGasStationInfo.fees[this.typeTranslation(type)].suggestedMaxFeePerGas
this.props.ethGasStationInfo.fees[this.typeTranslation(type)]
.suggestedMaxPriorityFeePerGas
).toFixed(2);
return maxPriorityFee;
}
Expand All @@ -189,7 +190,8 @@ export class TransactionFeeBoxComponent extends PureComponent {
const gasLimit = this.props.gasLimit ? this.props.gasLimit : DEFAULT_ETH_GAS_LIMIT;

const maxFee = parseFloat(
this.props.ethGasStationInfo.fees[this.typeTranslation(type)].suggestedMaxFeePerGas
this.props.ethGasStationInfo.fees[this.typeTranslation(type)]
.suggestedMaxPriorityFeePerGas
);

const ethFee = EthUnits.toEther((gasPrice + maxFee) * gasLimit, 'gwei');
Expand Down Expand Up @@ -252,9 +254,11 @@ export class TransactionFeeBoxComponent extends PureComponent {
}

const gasPrice = this.props.ethGasStationInfo[type];
const maxPriorityFee = parseFloat(
this.props.ethGasStationInfo.fees[this.typeTranslation(type)]
.suggestedMaxPriorityFeePerGas
const maxPriorityFee = Number(
parseFloat(
this.props.ethGasStationInfo.fees[this.typeTranslation(type)]
.suggestedMaxPriorityFeePerGas
).toFixed(2)
);

if (changeMaxPriorityFeeAction) {
Expand Down

0 comments on commit 3a7318b

Please sign in to comment.