add fee priority selector to Monero wallet withdraw form.
Expose GUI-style priority options in the CMS and include the chosen priority in withdrawal confirmation.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { moneroWithdrawPriorityOptions } from '@/consts/moneroWallet/moneroWithdrawPriorityOptions';
|
||||
import { MoneroWithdrawPriority } from '@/types/moneroWallet/MoneroWithdrawPriority';
|
||||
import type { MoneroWithdrawPriorityLabel } from '@/types/moneroWallet/MoneroWithdrawPriorityLabel';
|
||||
|
||||
export const resolveMoneroWithdrawPriorityLabel = (priority: MoneroWithdrawPriority): MoneroWithdrawPriorityLabel => {
|
||||
const option = moneroWithdrawPriorityOptions.find(({ value }) => value === priority);
|
||||
|
||||
if (!option) {
|
||||
throw new Error(`Invalid Monero withdraw priority: ${priority}`);
|
||||
}
|
||||
|
||||
return option.label;
|
||||
};
|
||||
Reference in New Issue
Block a user