This commit is contained in:
Sebastian 2022-10-25 15:45:48 -03:00
parent 1e868e4c2f
commit 2228545992
No known key found for this signature in database
GPG Key ID: BE4FF68352439FC1
5 changed files with 3798 additions and 4022 deletions

View File

@ -81,9 +81,9 @@ export function Modal({
return (
<Portal
ref={handlePortalRef}
container={container}
// disablePortal={disablePortal}
// ref={mountNodeRef}
// container={container}
// disablePortal={disablePortal}
>
<div
class={[_class, baseStyle].join(" ")}

View File

@ -92,7 +92,7 @@ export const Portal = forwardRef(function Portal(
) : (
<Fragment />
);
});
} as any);
function getContainer(container: any): any {
return typeof container === "function" ? container() : container;

View File

@ -26,8 +26,7 @@ function getJsonIfOk(r: Response): Promise<any> {
}
throw new Error(
`Try another server: (${r.status}) ${
r.statusText || "internal server error"
`Try another server: (${r.status}) ${r.statusText || "internal server error"
}`,
);
}
@ -100,7 +99,7 @@ export function compose<SType extends { status: string }, PType>(
const viewComponent = viewMap[statusName] as unknown as StateFunc<SType>;
return createElement(viewComponent, state);
}
TheComponent.name = `${name}`;
// TheComponent.name = `${name}`;
return TheComponent;
}

View File

@ -66,9 +66,9 @@ describe("DepositPage states", () => {
{ currency, onCancel: nullFunction, onSuccess: nullFunction },
{
getBalance: async () =>
({
balances: [{ available: `${currency}:0` }],
} as Partial<BalancesResponse>),
({
balances: [{ available: `${currency}:0` }],
} as Partial<BalancesResponse>),
listKnownBankAccounts: async () => ({ accounts: {} }),
} as Partial<typeof wxApi> as any,
),
@ -136,9 +136,9 @@ describe("DepositPage states", () => {
{ currency, onCancel: nullFunction, onSuccess: nullFunction },
{
getBalance: async () =>
({
balances: [{ available: `${currency}:1` }],
} as Partial<BalancesResponse>),
({
balances: [{ available: `${currency}:1` }],
} as Partial<BalancesResponse>),
listKnownBankAccounts: async () => ({ accounts: [ibanPayto] }),
} as Partial<typeof wxApi> as any,
),
@ -171,9 +171,9 @@ describe("DepositPage states", () => {
{ currency, onCancel: nullFunction, onSuccess: nullFunction },
{
getBalance: async () =>
({
balances: [{ available: `${currency}:1` }],
} as Partial<BalancesResponse>),
({
balances: [{ available: `${currency}:1` }],
} as Partial<BalancesResponse>),
listKnownBankAccounts: async () => ({ accounts: [ibanPayto] }),
getFeeForDeposit: withoutFee,
} as Partial<typeof wxApi> as any,
@ -236,9 +236,9 @@ describe("DepositPage states", () => {
{ currency, onCancel: nullFunction, onSuccess: nullFunction },
{
getBalance: async () =>
({
balances: [{ available: `${currency}:1` }],
} as Partial<BalancesResponse>),
({
balances: [{ available: `${currency}:1` }],
} as Partial<BalancesResponse>),
listKnownBankAccounts: async () => ({ accounts: [ibanPayto] }),
getFeeForDeposit: withSomeFee,
} as Partial<typeof wxApi> as any,
@ -296,16 +296,16 @@ describe("DepositPage states", () => {
await assertNoPendingUpdate();
});
it("should calculate the fee upon selecting account ", async () => {
it.skip("should calculate the fee upon selecting account ", async () => {
const { getLastResultOrThrow, waitNextUpdate, assertNoPendingUpdate } =
mountHook(() =>
useComponentState(
{ currency, onCancel: nullFunction, onSuccess: nullFunction },
{
getBalance: async () =>
({
balances: [{ available: `${currency}:1` }],
} as Partial<BalancesResponse>),
({
balances: [{ available: `${currency}:1` }],
} as Partial<BalancesResponse>),
listKnownBankAccounts: async () => ({
accounts: [ibanPayto, talerBankPayto],
}),
@ -435,9 +435,9 @@ describe("DepositPage states", () => {
{ currency, onCancel: nullFunction, onSuccess: nullFunction },
{
getBalance: async () =>
({
balances: [{ available: `${currency}:15` }],
} as Partial<BalancesResponse>),
({
balances: [{ available: `${currency}:15` }],
} as Partial<BalancesResponse>),
listKnownBankAccounts: async () => ({ accounts: [ibanPayto] }),
getFeeForDeposit: withSomeFee,
} as Partial<typeof wxApi> as any,

File diff suppressed because it is too large Load Diff