Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Merge pull request #3545 from brave/update-for-latest-publisher-ruleset
Browse files Browse the repository at this point in the history
support new Set(...) in ledger publisher ruleset
  • Loading branch information
BrendanEich authored Aug 30, 2016
2 parents 12f7e9b + ff51d6b commit f5496f0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
9 changes: 9 additions & 0 deletions app/extensions/brave/content/scripts/pageInformation.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,15 @@
expr['arguments'].forEach((argument) => { args.push(traverse(argument)) })
return value[traverse(op1.property, true)].apply(value, args)

case 'NewExpression':
op1 = expr.callee
if (op1.type !== 'Identifier') throw new Error('unexpected callee: ' + op1.type)
if (op1.name !== 'Set') throw new Error('only new Set(...) is allowed, not new ' + op1.name)
args = []
expr['arguments'].forEach((argument) => { args.push(traverse(argument)) })
if (args.length > 1) throw new Error('Set(...) takes at most one argument')
return new Set(args[0])

case 'ConditionalExpression':
return (traverse(expr.test) ? traverse(expr.consequent) : traverse(expr.alternate))

Expand Down
2 changes: 1 addition & 1 deletion js/about/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ class PaymentsTab extends ImmutableComponent {
<span id='fundsAmount'>
{this.btcToCurrencyString(this.props.ledgerData.get('balance'))}
<a href='https://brave.com/Payments_FAQ.html' target='_blank'>
<span className='fa fa-question-circle fundsFAQ'></span>
<span className='fa fa-question-circle fundsFAQ' />
</a>
</span>
{this.walletButton}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@
"keytar": "^3.0.0",
"l20n": "^3.5.1",
"ledger-balance": "^0.8.46",
"ledger-client": "^0.8.50",
"ledger-publisher": "^0.8.47",
"ledger-client": "^0.8.54",
"ledger-publisher": "^0.8.54",
"lru_cache": "^1.0.0",
"random-lib": "2.1.0",
"qr-image": "^3.1.0",
Expand Down

0 comments on commit f5496f0

Please sign in to comment.