Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(donation): add mutation and notice for curation vault withdrawal #4224

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ APOLLO_KEY=
APOLLO_GRAPH_REF=
MATTERS_OPENSEA_API_BASE=https://rinkeby-api.opensea.io/api/v1
MATTERS_LOGBOOK_CLAIMER_PRIVATE_KEY=
MATTERS_CURATION_VAULT_SIGNER_PRIVATE_KEY=
MATTERS_ALCHEMY_API_KEY=
MATTERS_OPENSEA_API_KEY=
MATTERS_EXCHANGE_RATES_DATA_API_KEY=QLqGNNhnz8MHpwOh9AqTJv069po2aR09
Expand Down
68 changes: 68 additions & 0 deletions db/migrations/20241129125017_alter_transaction_purpose.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
const { alterEnumString } = require('../utils')

const table = 'transaction'

exports.up = async (knex) => {
await knex.raw(
alterEnumString(table, 'purpose', [
'donation',
'add-credit',
'refund',
'payout',
'subscription',
'subscription-split',
'dispute-withdrawn-funds',
'dispute',
])
)

await knex(table)
.where({ purpose: 'dispute-withdrawn-funds' })
.update({ purpose: 'dispute' })

await knex.raw(
alterEnumString(table, 'purpose', [
'donation',
'add-credit',
'refund',
'payout',
'subscription',
'subscription-split',
'dispute',
'payout-reversal',
])
)
}

exports.down = async (knex) => {
await knex.raw(

Check warning on line 38 in db/migrations/20241129125017_alter_transaction_purpose.js

View check run for this annotation

Codecov / codecov/patch

db/migrations/20241129125017_alter_transaction_purpose.js#L38

Added line #L38 was not covered by tests
alterEnumString(table, 'purpose', [
'donation',
'add-credit',
'refund',
'payout',
'subscription',
'subscription-split',
'dispute-withdrawn-funds',
'dispute',
'curation-vault-withdrawal',
])
)

await knex(table)

Check warning on line 52 in db/migrations/20241129125017_alter_transaction_purpose.js

View check run for this annotation

Codecov / codecov/patch

db/migrations/20241129125017_alter_transaction_purpose.js#L52

Added line #L52 was not covered by tests
.where({ purpose: 'dispute' })
.update({ purpose: 'dispute-withdrawn-funds' })

await knex.raw(

Check warning on line 56 in db/migrations/20241129125017_alter_transaction_purpose.js

View check run for this annotation

Codecov / codecov/patch

db/migrations/20241129125017_alter_transaction_purpose.js#L56

Added line #L56 was not covered by tests
alterEnumString(table, 'purpose', [
'donation',
'add-credit',
'refund',
'payout',
'subscription',
'subscription-split',
'dispute-withdrawn-funds',
'dispute',
])
)
}
Loading