-
Notifications
You must be signed in to change notification settings - Fork 89
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: add fees to admin UI #2050
Conversation
✅ Deploy Preview for brilliant-pasca-3e80ec canceled.
|
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.
Rafiki currently does not handle receiving fees (even though we have that fee type included). Can we just gray out that entire section? Or should we remove it for now?
@mkurapov @BlairCurrey how should we deal with receiving fees? |
I think that looks good. |
1cbdddd
to
50a48de
Compare
error={response?.errors.sendingFee.fieldErrors.basisPoints} | ||
/> | ||
<p className='text-gray-500 text-sm mt-2'> | ||
A single basis point is equal to 0.01% of the total fee. |
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'm not sure that makes it clear. Should we say "A basis point equals 0.01% or 0.0001"? Or maybe add an example? "A fee of 1 basis point on $100 equals 0.0001*$100 = $0.01." Or both?
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.
maybe a stretch, but it could also be nice to make it response to user input. For example they type in 50 and see "50 basis points is equal to 0.50% of the total fee" (or the worked example Sabine is suggesting).
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.
How about "A single basis point is a fee equal to 0.01% of the total amount. A fee of 1 basis point on $100 is $0.01."
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.
That works. Maybe we should create an issue to make this line adapt like @BlairCurrey suggested. That could even be a last minute hacktoberfest contribution.
Last I knew there was a chance that Mojaloop payments might need them. Any more insight on that? If they wont need them then I'd be in favor of removing the type and implicitly treating all fees as sending. The type was added with the expectation that receiving fees would be implemented but they were scrapped. |
I think this is still the case, but not for the PoC we are working on right now with PCH but for the general MJL peer-to-peer payment method. |
@@ -160,6 +160,31 @@ export const getAssetReceivingFee: AssetResolvers<ApolloContext>['receivingFee'] | |||
return feeToGraphql(fee) | |||
} | |||
|
|||
export const getFees: AssetResolvers<ApolloContext>['fees'] = async ( |
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.
Can we sort the fees by createdAt
in a descending order? This way we will have latest fee at the top when showing the fees table.
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 also thought about this. But wasn't sure it was worth writing a new getPage function to do that. But I can.
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 think it makes sense to also display the payments and webhooks in descending order tbh. Can we pass a sorting option to the getPage
function?
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.
Will do. Moving this out into a separate issue - Add a sorting option to the getPage function #2088.
…ees are all in a single card
Co-authored-by: Radu-Cristian Popa <[email protected]>
0eb8bb9
to
fd040cb
Compare
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.
LGTM
Changes proposed in this pull request
Context
fixes #1834
Checklist
fixes #number