-
Notifications
You must be signed in to change notification settings - Fork 38
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
Balance refactor #3069
base: develop
Are you sure you want to change the base?
Balance refactor #3069
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
packages/apps/job-launcher/server/src/database/migrations/1738321689843-addTokenToJob.ts
Outdated
Show resolved
Hide resolved
packages/apps/job-launcher/server/src/modules/job/job.service.ts
Outdated
Show resolved
Hide resolved
packages/apps/job-launcher/server/src/modules/job/job.interface.ts
Outdated
Show resolved
Hide resolved
packages/apps/job-launcher/server/src/modules/payment/payment.service.ts
Show resolved
Hide resolved
packages/apps/job-launcher/server/src/modules/payment/payment.service.ts
Outdated
Show resolved
Hide resolved
} | ||
paymentEntity.amount = -totalPaymentAmount; // In the currency used for the payment. | ||
paymentEntity.currency = dto.paymentCurrency; | ||
paymentEntity.rate = paymentCurrencyRate; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it makes more sense to store an actual rate conversion (for example usd -> hmt (escrow fund token))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be obtained anyway, using payments and job info
Issue tracking
Closes #2982
Context behind the change
How has this been tested?
Unit tests partially updated. Job service needs a refactor so tests for this service will be implemented from scratch.
Release plan
Includes a migration to add
token
to jobs tablePotential risks; What to monitor; Rollback plan
Monitor payments table
Rollback: undo last migration