brave-intl / bat-go Goto Github PK
View Code? Open in Web Editor NEWPass "go", collect 200 BAT
License: Mozilla Public License 2.0
Pass "go", collect 200 BAT
License: Mozilla Public License 2.0
To clarify when grants are unavailable when a "circuit" has been tripped, we want to generate an explicit Sentry error specifying the circuit tripping.
We should then change our alerting in our monitoring slack channels to look only for this specific event.
Finally, we should expose an endpoint that can be monitored by DevOps to confirm when this has been tripped, as this is a critical service. (DevOps follow up to this is in https://github.com/brave/devops/issues/535).
we'll want to add rate limiting for the new endpoints in promotions/controllers.go
for cases where a parameter may be missed by the client yet not currently result in an error due to the default value after deserialization
connect util function can be used across many ./bin/* files so that we keep the code as DRY as possible
{"message":"Error getting available promotions: sql: Scan error on column index 8, name \"platform\": unsupported Scan, storing driver.Value type \u003cnil\u003e into type *string","code":400}
First, I don't understand this line:
Ensure that your .env file is populated with values for each of the env vars that does not have a default in docker-compose.yml.
What data should be in the file? What the name I must give for it? I think the README file doesn't fully explain what needs to be done to get 200 BAT. Maybe I missed something elsewhere?
Thanks.
see travis for details
/v1/promotions?paymentId={paymentId}&platform={platform}
time.Now().UTC()
vs time.Now()
we should probably do a bit of cleanup on our HTTP clients. we should expose the errors in a way that upstream consumers can perform different actions based on e.g. 404 vs 500 vs timeout
to be used by the browser for automatic migration of existing grant claims
see
Line 106 in 069924b
since none of these values can be changed this will help errors stemming from racing inserts
When I run make
in the project I've noticed that not all tests files are being picked up.
[I] โ go test -v --tags= ./... | grep "no test files"
? github.com/acroca/go-symbols [no test files]
? github.com/brave-intl/bat-go/bin/create-keypair [no test files]
? github.com/brave-intl/bat-go/bin/create-tokens [no test files]
? github.com/brave-intl/bat-go/bin/get-cert-fingerprint [no test files]
? github.com/brave-intl/bat-go/bin/grant-server [no test files]
? github.com/brave-intl/bat-go/bin/list-transactions [no test files]
? github.com/brave-intl/bat-go/bin/settlement-submit [no test files]
? github.com/brave-intl/bat-go/bin/transfer-funds [no test files]
? github.com/brave-intl/bat-go/bin/vault-create-wallet [no test files]
? github.com/brave-intl/bat-go/bin/vault-import-key [no test files]
? github.com/brave-intl/bat-go/bin/vault-init [no test files]
? github.com/brave-intl/bat-go/bin/vault-sign-settlement [no test files]
? github.com/brave-intl/bat-go/bin/vault-unseal [no test files]
? github.com/brave-intl/bat-go/bin/verify-tokens [no test files]
? github.com/brave-intl/bat-go/controllers [no test files]
? github.com/brave-intl/bat-go/datastore [no test files]
? github.com/brave-intl/bat-go/utils/pindialer [no test files]
? github.com/brave-intl/bat-go/utils/vaultsigner [no test files]
? github.com/brave-intl/bat-go/wallet [no test files]
? github.com/brave-intl/bat-go/wallet/provider [no test files]
However create-tokens
, grant-server
, datastore
, utils/vaultsigner
all have test files in their directories.
Is this an environmental problem with my computer or reproducible for anyone else?
This is @riastradh-brave's find for brave/go-update
, but I noticed that bat-go also uses ioutil.ReadAll
brave/go-update#1 (comment)
In order to keep track of which report authorizes which manual transaction, the settlement transaction will need to have an associated documentId
. Currently, the settlement output file does not track this information, thus when it is posted to Eyeshade, there isn't any way to determine which documentId
authorizes the transaction.
We should add an extra documentId
field for the Transaction struct which will be populated for all transactions whose type is 'manual'.
bat-go/settlement/settlement.go
Lines 25 to 44 in 11f3f35
This way the output file will have the documentId for manual transactions and the authorization information can be persisted in Eyeshade's transaction table when the output file is posted.
Related to brave-intl/bat-ledger#519
AltCurrency
only supports a few cryptocurrencies which poses a problem for ListTransactions
as the returned TransactionInfo
uses AltCurrency
to store the transfer currency.
We see this in practice when using list-transactions
on certain wallets (Uphold supports additional currencies such as USD
).
it's been deprecated
ads
grants vs othersGET /v3/grants
GET /v4/grants
GET /v5/grants
POST /v2/wallet/{paymentId}/claim
GET /v2/wallet/{paymentId}/grants/{type}
GET /v1/owners/{owner}/wallet
POST /v3/owners/{owner}/wallet/card
PUT /v1/owners/{owner}/wallet
PATCH /v1/owners/{owner}/wallet
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.