Skip to content

Commit

Permalink
Merge pull request #3299 from Emurgo/fix/YOEXT-786/erg-price-err
Browse files Browse the repository at this point in the history
fix(coins): skip signature validation for ERG token
  • Loading branch information
vsubhuman authored Oct 8, 2023
2 parents 90c0a50 + a266824 commit af69fdd
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,12 @@ export default class BaseCoinPriceStore
response.pubKeyDataSignature
);
}

if (!this.pubKeyData) {
throw new Error('missing pubKeyData - should never happen');
}
if (!verifyTicker(response.ticker, this.pubKeyData)) {

if (response.ticker.from === 'ERG' && !verifyTicker(response.ticker, this.pubKeyData)) {
throw new Error('Invalid ticker signature: ' + JSON.stringify(response.ticker));
}

Expand Down

0 comments on commit af69fdd

Please sign in to comment.