Skip to content
Snippets Groups Projects
Verified Commit 40a8b4a9 authored by Mateusz Tyszczak's avatar Mateusz Tyszczak :scroll:
Browse files

Fix reading getTime on possibly undefined object in alarm provider

parent 9375a388
No related branches found
No related tags found
1 merge request!25Add missing filters and providers
...@@ -55,9 +55,10 @@ export class AlarmProvider<TAccounts extends Array<TAccountName> = Array<TAccoun ...@@ -55,9 +55,10 @@ export class AlarmProvider<TAccounts extends Array<TAccountName> = Array<TAccoun
for(const account of this.accounts) { for(const account of this.accounts) {
if (accounts[account].recoveryAccount === STEEM_ACCOUNT_NAME) if (accounts[account].recoveryAccount === STEEM_ACCOUNT_NAME)
result.alarmsPerAccount[account].push(EAlarmType.LEGACY_RECOVERY_ACCOUNT_SET); result.alarmsPerAccount[account].push(EAlarmType.LEGACY_RECOVERY_ACCOUNT_SET);
if (accounts[account].governanceVoteExpiration === undefined) if (accounts[account].governanceVoteExpiration === undefined)
result.alarmsPerAccount[account].push(EAlarmType.GOVERNANCE_VOTE_EXPIRED); result.alarmsPerAccount[account].push(EAlarmType.GOVERNANCE_VOTE_EXPIRED);
if (accounts[account].governanceVoteExpiration!.getTime() < (Date.now() + ONE_MONTH_MS)) else if (accounts[account].governanceVoteExpiration!.getTime() < (Date.now() + ONE_MONTH_MS))
result.alarmsPerAccount[account].push(EAlarmType.GOVERNANCE_VOTE_EXPIRATION_SOON); result.alarmsPerAccount[account].push(EAlarmType.GOVERNANCE_VOTE_EXPIRATION_SOON);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment