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

Ledger beta integration #3195

Merged
merged 16 commits into from
Aug 18, 2016
Merged

Ledger beta integration #3195

merged 16 commits into from
Aug 18, 2016

Conversation

diracdeltas
Copy link
Member

Auditors: @bbondy

@bbondy
Copy link
Member

bbondy commented Aug 15, 2016

@bridiver @diracdeltas need you reviewing too pls (for whichever parts you did not write)

var setLocation = () => {
var duration, publisher

if (location !== currentLocation) console.log('new location: ' + location)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mrose17 can we remove this console.log? URLs from private browsing should not be logged

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure!  Feel free to remove it... Just there for debug!

/mtr

On Mon, Aug 15, 2016 at 4:51 PM -0700, "yan zhu (@bcrypt)" notifications@github.com wrote:

In app/ledger.js:

  • return data
    +}

+/*

  • * publisher utilities
  • */
    +
    +var currentLocation = 'NOOP'
    +var currentTimestamp = underscore.now()
    +
    +var visit = (location, timestamp) => {
  • var setLocation = () => {
  • var duration, publisher
  • if (location !== currentLocation) console.log('new location: ' + location)

@mrose17 can we remove this console.log? URLs from private browsing should not be logged


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

mrose17 added a commit that referenced this pull request Aug 17, 2016

if (isNaN(amount) || (amount <= 0)) return

underscore.extend(bravery.fee, { amount: amount })
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this expect amount to be in whatever the specified currency is, or is it just USD?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i just changed it so now this code is correct as long as amount corresponds to the currency in ledger-state

mrose17 and others added 16 commits August 17, 2016 12:30
better updateLedgerInfo() invocations
# Conflicts:
#	CHANGELOG.md
#	app/extensions.js
#	app/extensions/brave/locales/en-US/preferences.properties
#	app/ledger.js
#	app/menu.js
#	app/sessionStore.js
#	docs/state.md
#	js/about/preferences.js
#	js/actions/windowActions.js
#	js/components/frame.js
#	js/components/main.js
#	js/components/navigationBar.js
#	js/components/tab.js
#	js/components/tabs.js
#	js/components/tabsToolbar.js
#	js/components/urlBar.js
#	js/components/urlBarSuggestions.js
#	js/constants/appConfig.js
#	js/constants/appConstants.js
#	js/constants/messages.js
#	js/constants/settings.js
#	js/contextMenus.js
#	js/data/searchProviders.js
#	js/flash.js
#	js/state/frameStateUtil.js
#	js/stores/eventStore.js
#	js/stores/windowStore.js
#	less/variables.less
#	test/unit/state/frameStateUtilTest.js
…n calculating ballots, allow setting contribution amount

updates for #3217 and
#3198
@@ -111,6 +113,7 @@ module.exports = {
'shutdown.clear-cache': false,
'shutdown.clear-all-site-cookies': false
},
defaultFavicon: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA0xpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MUNFNTM2NTcxQzQyMTFFNjhEODk5OTY1MzJCOUU0QjEiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MUNFNTM2NTYxQzQyMTFFNjhEODk5OTY1MzJCOUU0QjEiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjUxZDUzZDBmLTYzOWMtMTE3OS04Yjk3LTg3Y2M5YTUyOWRmMSIgc3RSZWY6ZG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjUxZDUzZDBmLTYzOWMtMTE3OS04Yjk3LTg3Y2M5YTUyOWRmMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PmF3+n4AAAAoSURBVHja7M1BAQAABAQw9O98SvDbCqyT1KepZwKBQCAQCAQ3VoABAAu6Ay00hnjWAAAAAElFTkSuQmCC',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer if we don't store a base64 encoded image url and instead make this an actual image and put a link here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bbondy - i'd prefer that as well. however, the link has to be stored locally for privacy considerations.

so, what is required is a small API that allows ledger.js to store/update an image locally and get back the associated URL...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mrose17 i think @bbondy meant bundle the image in app/extensions/brave/imgso it's still loaded locally but not a long constants string. could you take care of that?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

app/ledger.js can overwrite the file when it needs to update the image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if someone will tell me what the API is, i can modify ledger.js ... but (like so many things!), i don't know the API...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bbondy @diracdeltas tells me i misunderstood what you were asking... sorry! i've got a PR that fixes the default icon issue...

@bbondy
Copy link
Member

bbondy commented Aug 18, 2016

So much cleaner than last time I looked! Thanks for all the great work here.
I'm sure we'll have followups but I just did a quick pass for now and I'll merge and we'll build from off of that.

@bbondy bbondy merged commit c957523 into master Aug 18, 2016
@luixxiul luixxiul added this to the 0.11.6dev milestone Aug 18, 2016
@bridiver
Copy link
Collaborator

I know this is already merged so I'm a little late to the party, but I didn't see any tests. Just a reminder that we made a decision a while ago to require tests for all new features so we should add some to cover this as a follow-up

@diracdeltas
Copy link
Member Author

#3249

@bridiver
Copy link
Collaborator

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants