Merge pull request #44 from exstake/feature/deposit

Feature/deposit
This commit is contained in:
João Geonizeli
2021-09-06 09:41:13 -03:00
committed by GitHub
41 changed files with 1394 additions and 216 deletions

View File

@@ -0,0 +1,6 @@
# frozen_string_literal: true
module Inputs
class CreateDepositOrderAttributesInput < Types::BaseInputObject
argument :amount_cents, Integer, "Amount to be paid", required: true
end
end

View File

@@ -0,0 +1,6 @@
# frozen_string_literal: true
module Inputs
class DepositOrderFilterInput < Types::BaseInputObject
argument :status, [Types::ProcessStatusEnum], required: false
end
end

View File

@@ -0,0 +1,19 @@
# frozen_string_literal: true
module Mutations
class CreateDepositOrder < BaseMutation
field :order, Types::DepositOrderType, null: true
argument :order, Inputs::CreateStakeOrderAttributesInput, required: true
def resolve(order:)
ActiveRecord::Base.transaction do
record = BuildDepositOrder.new(paid_amount_cents: order[:amount_cents], user: current_user.id)
record.save!
{ order: record }
rescue ActiveRecord::RecordInvalid => e
{ errors: Resolvers::ModelErrors.from_active_record_model(e.record) }
end
end
end
end

View File

@@ -5,5 +5,11 @@ module Types
has_nodes_field(false) has_nodes_field(false)
edges_nullable(false) edges_nullable(false)
edge_nullable(false) edge_nullable(false)
field :total_count, Integer, null: false
def total_count
object.items.count
end
end end
end end

View File

@@ -0,0 +1,17 @@
# frozen_string_literal: true
module Types
class DepositOrderType < Types::BaseObject
implements GraphQL::Types::Relay::Node
global_id_field :id
graphql_name "DepositOrder"
field :id, ID, null: false
field :status, ProcessStatusEnum, null: false
field :received_amount_cents, Integer, null: false
field :paid_amount_cents, Integer, null: false
field :transaction_id, String, null: false
field :created_at, GraphQL::Types::ISO8601DateTime, null: false
field :updated_at, GraphQL::Types::ISO8601DateTime, null: false
end
end

View File

@@ -1,6 +1,7 @@
# frozen_string_literal: true # frozen_string_literal: true
module Types module Types
class MutationType < Types::BaseObject class MutationType < Types::BaseObject
field :create_deposit_order, mutation: Mutations::CreateDepositOrder
field :create_stake_remove_order, mutation: Mutations::CreateStakeRemoveOrder field :create_stake_remove_order, mutation: Mutations::CreateStakeRemoveOrder
field :create_stake_order, mutation: Mutations::CreateStakeOrder field :create_stake_order, mutation: Mutations::CreateStakeOrder
field :create_sell_crypto_order, mutation: Mutations::CreateSellCryptoOrder field :create_sell_crypto_order, mutation: Mutations::CreateSellCryptoOrder

View File

@@ -31,5 +31,17 @@ module Types
ransack(scope, filter) ransack(scope, filter)
end end
field :deposit_orders, DepositOrderType.connection_type, null: false do
argument :filter, Inputs::DepositOrderFilterInput, required: false
end
def deposit_orders(filter: nil)
scope = Pundit.policy_scope(current_user, DepositOrder)
return scope.where(status: filter.status) if filter&.status
scope
end
end end
end end

View File

@@ -14,6 +14,8 @@ class XStakeSchema < GraphQL::Schema
Types::SellCryptoOrderType Types::SellCryptoOrderType
when BuyCryptoOrder when BuyCryptoOrder
Types::BuyCryptoOrderType Types::BuyCryptoOrderType
when DepositOrder
Types::DepositOrderType
else else
raise(GraphQL::RequiredImplementationMissingError, "Unexpected object: #{obj}") raise(GraphQL::RequiredImplementationMissingError, "Unexpected object: #{obj}")
end end

View File

@@ -25,6 +25,7 @@ type BuyCryptoOrderConnection {
Information to aid in pagination. Information to aid in pagination.
""" """
pageInfo: PageInfo! pageInfo: PageInfo!
totalCount: Int!
} }
""" """
@@ -76,6 +77,33 @@ type CreateBuyCryptoOrderPayload {
order: BuyCryptoOrder order: BuyCryptoOrder
} }
"""
Autogenerated input type of CreateDepositOrder
"""
input CreateDepositOrderInput {
"""
A unique identifier for the client performing the mutation.
"""
clientMutationId: String
order: CreateStakeOrderAttributesInput!
}
"""
Autogenerated return type of CreateDepositOrder
"""
type CreateDepositOrderPayload {
"""
A unique identifier for the client performing the mutation.
"""
clientMutationId: String
"""
Errors encountered during execution of the mutation.
"""
errors: [RecordInvalid!]
order: DepositOrder
}
input CreateSellCryptoOrderAttributesInput { input CreateSellCryptoOrderAttributesInput {
""" """
Amount to be paid Amount to be paid
@@ -172,6 +200,51 @@ type CreateStakeRemoveOrderPayload {
order: StakeOrder order: StakeOrder
} }
type DepositOrder implements Node {
createdAt: ISO8601DateTime!
id: ID!
paidAmountCents: Int!
receivedAmountCents: Int!
status: ProcessStatus!
transactionId: String!
updatedAt: ISO8601DateTime!
}
"""
The connection type for DepositOrder.
"""
type DepositOrderConnection {
"""
A list of edges.
"""
edges: [DepositOrderEdge!]!
"""
Information to aid in pagination.
"""
pageInfo: PageInfo!
totalCount: Int!
}
"""
An edge in a connection.
"""
type DepositOrderEdge {
"""
A cursor for use in pagination.
"""
cursor: String!
"""
The item at the end of the edge.
"""
node: DepositOrder!
}
input DepositOrderFilterInput {
status: [ProcessStatus!]
}
type FiatBalance implements Node { type FiatBalance implements Node {
amountCents: Int! amountCents: Int!
amountCurrency: String! amountCurrency: String!
@@ -190,6 +263,12 @@ type Mutation {
""" """
input: CreateBuyCryptoOrderInput! input: CreateBuyCryptoOrderInput!
): CreateBuyCryptoOrderPayload ): CreateBuyCryptoOrderPayload
createDepositOrder(
"""
Parameters for CreateDepositOrder
"""
input: CreateDepositOrderInput!
): CreateDepositOrderPayload
createSellCryptoOrder( createSellCryptoOrder(
""" """
Parameters for CreateSellCryptoOrder Parameters for CreateSellCryptoOrder
@@ -286,6 +365,28 @@ type Query {
last: Int last: Int
): BuyCryptoOrderConnection! ): BuyCryptoOrderConnection!
currentUser: User currentUser: User
depositOrders(
"""
Returns the elements in the list that come after the specified cursor.
"""
after: String
"""
Returns the elements in the list that come before the specified cursor.
"""
before: String
filter: DepositOrderFilterInput
"""
Returns the first _n_ elements from the list.
"""
first: Int
"""
Returns the last _n_ elements from the list.
"""
last: Int
): DepositOrderConnection!
""" """
Fetches an object given its ID. Fetches an object given its ID.
@@ -380,6 +481,7 @@ type SellCryptoOrderConnection {
Information to aid in pagination. Information to aid in pagination.
""" """
pageInfo: PageInfo! pageInfo: PageInfo!
totalCount: Int!
} }
""" """
@@ -419,6 +521,7 @@ type StakeOrderConnection {
Information to aid in pagination. Information to aid in pagination.
""" """
pageInfo: PageInfo! pageInfo: PageInfo!
totalCount: Int!
} }
""" """

View File

@@ -22,6 +22,9 @@ export const Routes: FC = () => {
<Route exact path="/orders/stake"> <Route exact path="/orders/stake">
<Orders.Stake /> <Orders.Stake />
</Route> </Route>
<Route exact path="/orders/deposit">
<Orders.Deposit />
</Route>
</Switch> </Switch>
); );
}; };

View File

@@ -1,10 +1,11 @@
import type { FC } from "react"; import type { FC } from "react";
import React, { Fragment } from "react"; import React, { Fragment } from "react";
import { Dialog, Transition } from "@headlessui/react"; import { Dialog, Transition } from "@headlessui/react";
import cs from "classnames";
type Props = { type Props = {
isOpen: boolean; isOpen: boolean;
setIsOpen: (state: boolean) => void; setIsOpen?: (state: boolean) => void;
title: string; title: string;
className?: string; className?: string;
}; };
@@ -17,7 +18,9 @@ export const Modal: FC<Props> = ({
className = "", className = "",
}) => { }) => {
const closeModal = () => { const closeModal = () => {
setIsOpen(false); if (setIsOpen) {
setIsOpen(false);
}
}; };
return ( return (
@@ -25,7 +28,7 @@ export const Modal: FC<Props> = ({
<Dialog <Dialog
open={isOpen} open={isOpen}
as="div" as="div"
className={`fixed inset-0 z-10 overflow-y-auto ${className}`} className="fixed inset-0 z-10 overflow-y-auto"
onClose={closeModal} onClose={closeModal}
> >
<div className="min-h-screen px-4 text-center"> <div className="min-h-screen px-4 text-center">
@@ -56,7 +59,12 @@ export const Modal: FC<Props> = ({
leaveFrom="opacity-100 scale-100" leaveFrom="opacity-100 scale-100"
leaveTo="opacity-0 scale-95" leaveTo="opacity-0 scale-95"
> >
<div className="inline-block w-full max-w-md p-6 my-8 overflow-hidden text-left align-middle transition-all transform bg-white shadow-xl rounded"> <div
className={cs(
"inline-block w-full max-w-md p-6 my-8 overflow-hidden text-left align-middle transition-all transform bg-white shadow-xl rounded",
className
)}
>
<Dialog.Title <Dialog.Title
as="h3" as="h3"
className="text-lg font-medium leading-6 text-gray-900 mb-4" className="text-lg font-medium leading-6 text-gray-900 mb-4"

View File

@@ -31,6 +31,10 @@ const MenuItems: MenuItem[] = [
label: "Ordem de Stake", label: "Ordem de Stake",
path: "/orders/stake", path: "/orders/stake",
}, },
{
label: "Ordem de Depósito",
path: "/orders/deposit",
},
]; ];
export const SideNav = () => { export const SideNav = () => {

View File

@@ -0,0 +1,27 @@
import type { FC } from "react";
import React from "react";
type Props = {
columns: string[];
};
export const Table: FC<Props> = ({ columns, children }) => {
return (
<table className="min-w-full leading-normal">
<thead>
<tr>
{columns.map((column, index) => (
<th
key={index}
scope="col"
className="px-5 py-3 bg-white border-b border-gray-200 text-gray-800 text-left text-sm uppercase font-normal"
>
{column}
</th>
))}
</tr>
</thead>
<tbody>{children}</tbody>
</table>
);
};

View File

@@ -0,0 +1,29 @@
import type { FC, ReactNode } from "react";
import React from "react";
type Props = {
items?: Array<ReactNode | string>;
id?: string;
onClick?: (itemId: string) => void;
};
export const TableRow: FC<Props> = ({ items, id, onClick }) => {
const handleClick = () => {
if (onClick && id) {
onClick(id);
}
};
return (
<tr onClick={handleClick}>
{items?.map((item, index) => (
<td
key={index}
className="px-5 py-5 border-b border-gray-200 bg-white text-sm"
>
<p className="text-gray-900 whitespace-nowrap">{item}</p>
</td>
))}
</tr>
);
};

View File

@@ -0,0 +1,2 @@
export * from "./Table";
export * from "./TableRow";

View File

@@ -4,3 +4,4 @@ export * from "./Modal";
export * from "./Input"; export * from "./Input";
export * from "./Button"; export * from "./Button";
export * from "./Spinner"; export * from "./Spinner";
export * from "./Table";

View File

@@ -0,0 +1,37 @@
import { graphql } from "babel-plugin-relay/macro";
import type { FC } from "react";
import React from "react";
import { useLazyLoadQuery } from "react-relay";
import type { DepositQuery } from "./__generated__/DepositQuery.graphql";
import { Messages } from "../../../messages";
import { History } from "./History";
export const Deposit: FC = () => {
const { depositOrders } = useLazyLoadQuery<DepositQuery>(
graphql`
query DepositQuery {
depositOrders {
totalCount
...History_depositOrders
}
}
`,
{}
);
if (!depositOrders.totalCount)
return <Messages.NoHistory historyName="depósito" />;
return (
<div className="container mx-auto px-4 sm:px-8">
<div className="py-8">
<div className="-mx-4 sm:-mx-8 px-4 sm:px-8 py-4 overflow-x-auto">
<div className="inline-block min-w-full shadow rounded-lg overflow-hidden">
<History ordersRef={depositOrders} />
</div>
</div>
</div>
</div>
);
};

View File

@@ -0,0 +1,87 @@
import { graphql } from "babel-plugin-relay/macro";
import type { FC } from "react";
import React, { useState } from "react";
import cs from "classnames";
import { useFragment } from "react-relay";
import { Table, TableRow } from "../../../../components";
import { getStatusTextAndColors } from "../../utils/processStatus";
import { centsToUnit } from "../../../../utils/fiatMoney";
import type { History_depositOrders$key } from "./__generated__/History_depositOrders.graphql";
import { Show } from "../Show";
type Props = {
ordersRef: History_depositOrders$key;
};
export const History: FC<Props> = ({ ordersRef }) => {
const [openOrderId, setOpenOrderId] = useState<string | null>(null);
const { edges } = useFragment<History_depositOrders$key>(
graphql`
fragment History_depositOrders on DepositOrderConnection {
edges {
node {
id
status
createdAt
paidAmountCents
receivedAmountCents
...Show_deposit_order
}
}
}
`,
ordersRef
);
const openOrder = edges.find(({ node }) => node.id === openOrderId);
const onClose = () => setOpenOrderId(null);
return (
<>
{openOrder && <Show orderRef={openOrder.node} onClose={onClose} />}
<Table
columns={["Montante pago", "Montante recebido", "Criado em", "Status"]}
>
{edges.map(({ node }) => {
const [label, textStyles, bgStyles] = getStatusTextAndColors(
node.status
);
const status = (
<span
className={cs(
"relative inline-block px-3 py-1 font-semibold text-red-900 leading-tight",
textStyles
)}
>
<span
aria-hidden="true"
className={cs(
"absolute inset-0 opacity-50 rounded-full",
bgStyles
)}
/>
<span className="relative">{label}</span>
</span>
);
return (
<TableRow
key={node.id}
onClick={(orderId) => setOpenOrderId(orderId)}
id={node.id}
items={[
`${centsToUnit(node.paidAmountCents)} BRL`,
`${centsToUnit(node.receivedAmountCents)} BRL`,
new Date(node.createdAt as string).toLocaleTimeString(),
status,
]}
/>
);
})}
</Table>
</>
);
};

View File

@@ -0,0 +1,102 @@
/* tslint:disable */
/* eslint-disable */
// @ts-nocheck
import { ReaderFragment } from "relay-runtime";
import { FragmentRefs } from "relay-runtime";
export type ProcessStatus = "CANCELED" | "COMPLETED" | "PROCESSING" | "%future added value";
export type History_depositOrders = {
readonly edges: ReadonlyArray<{
readonly node: {
readonly id: string;
readonly status: ProcessStatus;
readonly createdAt: unknown;
readonly paidAmountCents: number;
readonly receivedAmountCents: number;
readonly " $fragmentRefs": FragmentRefs<"Show_deposit_order">;
};
}>;
readonly " $refType": "History_depositOrders";
};
export type History_depositOrders$data = History_depositOrders;
export type History_depositOrders$key = {
readonly " $data"?: History_depositOrders$data;
readonly " $fragmentRefs": FragmentRefs<"History_depositOrders">;
};
const node: ReaderFragment = {
"argumentDefinitions": [],
"kind": "Fragment",
"metadata": null,
"name": "History_depositOrders",
"selections": [
{
"alias": null,
"args": null,
"concreteType": "DepositOrderEdge",
"kind": "LinkedField",
"name": "edges",
"plural": true,
"selections": [
{
"alias": null,
"args": null,
"concreteType": "DepositOrder",
"kind": "LinkedField",
"name": "node",
"plural": false,
"selections": [
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "id",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "status",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "createdAt",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "paidAmountCents",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "receivedAmountCents",
"storageKey": null
},
{
"args": null,
"kind": "FragmentSpread",
"name": "Show_deposit_order"
}
],
"storageKey": null
}
],
"storageKey": null
}
],
"type": "DepositOrderConnection",
"abstractKey": null
};
(node as any).hash = 'f810eed214d3beb7c443588e670d8f39';
export default node;

View File

@@ -0,0 +1 @@
export * from "./History";

View File

@@ -0,0 +1,94 @@
import { graphql } from "babel-plugin-relay/macro";
import type { FC } from "react";
import React from "react";
import { useFragment } from "react-relay";
import copy from "copy-to-clipboard";
import { Button, Modal } from "../../../../components";
import { usePixQr } from "./hooks/usePixQr";
import type { Show_deposit_order$key } from "./__generated__/Show_deposit_order.graphql";
import { centsToUnit } from "../../../../utils/fiatMoney";
import { getStatusTextAndColors } from "../../utils/processStatus";
type Props = {
orderRef: Show_deposit_order$key;
onClose: () => void;
};
export const Show: FC<Props> = ({ orderRef, onClose }) => {
const order = useFragment<Show_deposit_order$key>(
graphql`
fragment Show_deposit_order on DepositOrder {
transactionId
paidAmountCents
receivedAmountCents
status
createdAt
}
`,
orderRef
);
const { qr, payload } = usePixQr({
value: order.paidAmountCents / 100,
transactionId: order.transactionId,
});
const handleClose = (_value: boolean) => {
onClose();
};
const handleCopy = () => {
copy(payload);
};
const [statusLabel] = getStatusTextAndColors(order.status);
return (
<Modal
title="Pedido de deposito"
isOpen
setIsOpen={handleClose}
className="w-full md:max-w-xl"
>
<div className="flex flex-col md:flex-row justify-between">
<div className="md:pt-2">
<ul>
<li>
Montante pago:{" "}
<span className="font-bold">
{centsToUnit(order.paidAmountCents)} BRL
</span>
</li>
<li>
Montante recebido:{" "}
<span className="font-bold">
{centsToUnit(order.receivedAmountCents)}
</span>
</li>
<li>
Pedido feito em:{" "}
<span className="font-bold">
{new Date(order.createdAt as string).toLocaleTimeString()}
</span>
</li>
<li>
Metodo de pagamento: <span className="font-bold">PIX</span>
</li>
<li>
Status: <span className="font-bold">{statusLabel}</span>
</li>
</ul>
</div>
<div>
<img
className="w-full m-auto"
src={qr}
alt="QR code para o PIX de deposito"
/>
<Button onClick={handleCopy}>Copiar codigo</Button>
</div>
</div>
</Modal>
);
};

View File

@@ -0,0 +1,70 @@
/* tslint:disable */
/* eslint-disable */
// @ts-nocheck
import { ReaderFragment } from "relay-runtime";
import { FragmentRefs } from "relay-runtime";
export type ProcessStatus = "CANCELED" | "COMPLETED" | "PROCESSING" | "%future added value";
export type Show_deposit_order = {
readonly transactionId: string;
readonly paidAmountCents: number;
readonly receivedAmountCents: number;
readonly status: ProcessStatus;
readonly createdAt: unknown;
readonly " $refType": "Show_deposit_order";
};
export type Show_deposit_order$data = Show_deposit_order;
export type Show_deposit_order$key = {
readonly " $data"?: Show_deposit_order$data;
readonly " $fragmentRefs": FragmentRefs<"Show_deposit_order">;
};
const node: ReaderFragment = {
"argumentDefinitions": [],
"kind": "Fragment",
"metadata": null,
"name": "Show_deposit_order",
"selections": [
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "transactionId",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "paidAmountCents",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "receivedAmountCents",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "status",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "createdAt",
"storageKey": null
}
],
"type": "DepositOrder",
"abstractKey": null
};
(node as any).hash = '73e84cef63c17faa3087f19ba2c73e69';
export default node;

View File

@@ -0,0 +1,33 @@
import { useEffect, useState } from "react";
import { QrCodePix } from "qrcode-pix";
type Props = {
value: number;
transactionId: string;
};
export const usePixQr = ({ value, transactionId }: Props) => {
const [qr, setQr] = useState<string>();
const qrCodePix = QrCodePix({
version: "01",
key: "joao.geonizeli@gmail.com",
name: "X Stake",
city: "TERESOPOLIS",
transactionId,
value,
notRepeatPayment: true,
});
useEffect(() => {
qrCodePix.base64().then((result) => {
setQr(result);
});
}, []);
return {
payload: qrCodePix.payload(),
loading: !qr,
qr,
};
};

View File

@@ -0,0 +1 @@
export * from "./Show";

View File

@@ -0,0 +1,182 @@
/* tslint:disable */
/* eslint-disable */
// @ts-nocheck
import { ConcreteRequest } from "relay-runtime";
import { FragmentRefs } from "relay-runtime";
export type DepositQueryVariables = {};
export type DepositQueryResponse = {
readonly depositOrders: {
readonly totalCount: number;
readonly " $fragmentRefs": FragmentRefs<"History_depositOrders">;
};
};
export type DepositQuery = {
readonly response: DepositQueryResponse;
readonly variables: DepositQueryVariables;
};
/*
query DepositQuery {
depositOrders {
totalCount
...History_depositOrders
}
}
fragment History_depositOrders on DepositOrderConnection {
edges {
node {
id
status
createdAt
paidAmountCents
receivedAmountCents
...Show_deposit_order
}
}
}
fragment Show_deposit_order on DepositOrder {
transactionId
paidAmountCents
receivedAmountCents
status
createdAt
}
*/
const node: ConcreteRequest = (function(){
var v0 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "totalCount",
"storageKey": null
};
return {
"fragment": {
"argumentDefinitions": [],
"kind": "Fragment",
"metadata": null,
"name": "DepositQuery",
"selections": [
{
"alias": null,
"args": null,
"concreteType": "DepositOrderConnection",
"kind": "LinkedField",
"name": "depositOrders",
"plural": false,
"selections": [
(v0/*: any*/),
{
"args": null,
"kind": "FragmentSpread",
"name": "History_depositOrders"
}
],
"storageKey": null
}
],
"type": "Query",
"abstractKey": null
},
"kind": "Request",
"operation": {
"argumentDefinitions": [],
"kind": "Operation",
"name": "DepositQuery",
"selections": [
{
"alias": null,
"args": null,
"concreteType": "DepositOrderConnection",
"kind": "LinkedField",
"name": "depositOrders",
"plural": false,
"selections": [
(v0/*: any*/),
{
"alias": null,
"args": null,
"concreteType": "DepositOrderEdge",
"kind": "LinkedField",
"name": "edges",
"plural": true,
"selections": [
{
"alias": null,
"args": null,
"concreteType": "DepositOrder",
"kind": "LinkedField",
"name": "node",
"plural": false,
"selections": [
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "id",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "status",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "createdAt",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "paidAmountCents",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "receivedAmountCents",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "transactionId",
"storageKey": null
}
],
"storageKey": null
}
],
"storageKey": null
}
],
"storageKey": null
}
]
},
"params": {
"cacheID": "99f3fbbd023ef8a38b0490275cb58aa6",
"id": null,
"metadata": {},
"name": "DepositQuery",
"operationKind": "query",
"text": "query DepositQuery {\n depositOrders {\n totalCount\n ...History_depositOrders\n }\n}\n\nfragment History_depositOrders on DepositOrderConnection {\n edges {\n node {\n id\n status\n createdAt\n paidAmountCents\n receivedAmountCents\n ...Show_deposit_order\n }\n }\n}\n\nfragment Show_deposit_order on DepositOrder {\n transactionId\n paidAmountCents\n receivedAmountCents\n status\n createdAt\n}\n"
}
};
})();
(node as any).hash = '8394525008fabe782ee41126e50d63b1';
export default node;

View File

@@ -0,0 +1 @@
export * from "./Deposit";

View File

@@ -3,6 +3,7 @@ import type { FC } from "react";
import React from "react"; import React from "react";
import { useFragment } from "react-relay"; import { useFragment } from "react-relay";
import { Table } from "../../../../components";
import { Messages } from "../../../../messages"; import { Messages } from "../../../../messages";
import { centsToUnit } from "../../../../utils/fiatMoney"; import { centsToUnit } from "../../../../utils/fiatMoney";
import type { CryptoExchangeOrderProps } from "./components/CryptoExchangeOrder"; import type { CryptoExchangeOrderProps } from "./components/CryptoExchangeOrder";
@@ -119,41 +120,13 @@ export const ExchangeHistory: FC<Props> = ({
<div className="py-8"> <div className="py-8">
<div className="-mx-4 sm:-mx-8 px-4 sm:px-8 py-4 overflow-x-auto"> <div className="-mx-4 sm:-mx-8 px-4 sm:px-8 py-4 overflow-x-auto">
<div className="inline-block min-w-full shadow rounded-lg overflow-hidden"> <div className="inline-block min-w-full shadow rounded-lg overflow-hidden">
<table className="min-w-full leading-normal"> <Table
<thead> columns={["Valor pago", "Valor recebido", "Criado em", "Status"]}
<tr> >
<th {orderRows.map((order) => {
scope="col" return <CryptoExchangeOrder key={order?.id} {...order} />;
className="px-5 py-3 bg-white border-b border-gray-200 text-gray-800 text-left text-sm uppercase font-normal" })}
> </Table>
Valor pago
</th>
<th
scope="col"
className="px-5 py-3 bg-white border-b border-gray-200 text-gray-800 text-left text-sm uppercase font-normal"
>
Valor recebido
</th>
<th
scope="col"
className="px-5 py-3 bg-white border-b border-gray-200 text-gray-800 text-left text-sm uppercase font-normal"
>
Criado em
</th>
<th
scope="col"
className="px-5 py-3 bg-white border-b border-gray-200 text-gray-800 text-left text-sm uppercase font-normal"
>
Status
</th>
</tr>
</thead>
<tbody>
{orderRows.map((order) => {
return <CryptoExchangeOrder key={order?.id} {...order} />;
})}
</tbody>
</table>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -7,6 +7,7 @@ import cx from "classnames";
import { getStatusTextAndColors } from "../utils/processStatus"; import { getStatusTextAndColors } from "../utils/processStatus";
import type { StakeQuery } from "./__generated__/StakeQuery.graphql"; import type { StakeQuery } from "./__generated__/StakeQuery.graphql";
import { Messages } from "../../../messages"; import { Messages } from "../../../messages";
import { Table, TableRow } from "../../../components";
export const Stake: FC = () => { export const Stake: FC = () => {
const { stakeOrders } = useLazyLoadQuery<StakeQuery>( const { stakeOrders } = useLazyLoadQuery<StakeQuery>(
@@ -36,82 +37,43 @@ export const Stake: FC = () => {
<div className="py-8"> <div className="py-8">
<div className="-mx-4 sm:-mx-8 px-4 sm:px-8 py-4 overflow-x-auto"> <div className="-mx-4 sm:-mx-8 px-4 sm:px-8 py-4 overflow-x-auto">
<div className="inline-block min-w-full shadow rounded-lg overflow-hidden"> <div className="inline-block min-w-full shadow rounded-lg overflow-hidden">
<table className="min-w-full leading-normal"> <Table columns={["Pool", "Montante", "Criado em", "Status"]}>
<thead> {stakeOrders.edges.map(({ node }) => {
<tr> const [label, textStyles, bgStyles] = getStatusTextAndColors(
<th node.status
scope="col" );
className="px-5 py-3 bg-white border-b border-gray-200 text-gray-800 text-left text-sm uppercase font-normal"
>
Pool
</th>
<th
scope="col"
className="px-5 py-3 bg-white border-b border-gray-200 text-gray-800 text-left text-sm uppercase font-normal"
>
Montante
</th>
<th
scope="col"
className="px-5 py-3 bg-white border-b border-gray-200 text-gray-800 text-left text-sm uppercase font-normal"
>
Criado em
</th>
<th
scope="col"
className="px-5 py-3 bg-white border-b border-gray-200 text-gray-800 text-left text-sm uppercase font-normal"
>
Status
</th>
</tr>
</thead>
<tbody>
{stakeOrders.edges.map(({ node }) => {
const [label, textStyles, bgStyles] = getStatusTextAndColors(
node.status
);
return ( const status = (
<tr key={node.id}> <span
<td className="px-5 py-5 border-b border-gray-200 bg-white text-sm"> className={cx(
<p className="text-gray-900 whitespace-nowrap"> "relative inline-block px-3 py-1 font-semibold text-red-900 leading-tight",
{node.poolName} textStyles
</p> )}
</td> >
<td className="px-5 py-5 border-b border-gray-200 bg-white text-sm"> <span
<p className="text-gray-900 whitespace-nowrap"> aria-hidden="true"
{node.amount} className={cx(
</p> "absolute inset-0 opacity-50 rounded-full",
</td> bgStyles
<td className="px-5 py-5 border-b border-gray-200 bg-white text-sm"> )}
<p className="text-gray-900 whitespace-nowrap"> />
{new Date( <span className="relative">{label}</span>
node.createdAt as string </span>
).toLocaleTimeString()} );
</p>
</td> return (
<td className="px-5 py-5 border-b border-gray-200 bg-white text-sm"> <TableRow
<span key={node.id}
className={cx( items={[
"relative inline-block px-3 py-1 font-semibold text-red-900 leading-tight", node.poolName,
textStyles node.amount,
)} new Date(node.createdAt as string).toLocaleTimeString(),
> status,
<span ]}
aria-hidden="true" />
className={cx( );
"absolute inset-0 opacity-50 rounded-full", })}
bgStyles </Table>
)}
/>
<span className="relative">{label}</span>
</span>
</td>
</tr>
);
})}
</tbody>
</table>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -1,7 +1,9 @@
import { Exchange } from "./Exchange"; import { Exchange } from "./Exchange";
import { Stake } from "./Stake"; import { Stake } from "./Stake";
import { Deposit } from "./Deposit";
export const Orders = { export const Orders = {
Deposit,
Exchange, Exchange,
Stake, Stake,
}; };

View File

@@ -0,0 +1,32 @@
# frozen_string_literal: true
# == Schema Information
#
# Table name: deposit_orders
#
# id :bigint not null, primary key
# paid_amount_cents :integer default(0), not null
# received_amount_cents :integer default(0), not null
# status :string not null
# created_at :datetime not null
# updated_at :datetime not null
# transaction_id :uuid not null
# user_id :bigint not null
#
# Indexes
#
# index_deposit_orders_on_user_id (user_id)
#
# Foreign Keys
#
# fk_rails_... (user_id => users.id)
#
class DepositOrder < ApplicationRecord
include Processable
include Trackable
belongs_to :user
monetize :paid_amount_cents
monetize :received_amount_cents
end

View File

@@ -0,0 +1,10 @@
# frozen_string_literal: true
class DepositOrderPolicy < ApplicationPolicy
class Scope < Scope
def resolve
return scope.none if user.nil?
scope.where(user_id: user.id)
end
end
end

View File

@@ -0,0 +1,19 @@
# frozen_string_literal: true
class BuildDepositOrder
DEPOSIT_FEE = 0.05
attr_reader :paid_amount_cents, :user_id
def initilize(paid_amount_cents:, user_id:)
@paid_amount_cents = paid_amount_cents
@user_id = user_id
end
def build
DepositOrder.new(
user_id: user_id,
paid_amount_cents: paid_amount_cents,
received_amount_cents: paid_amount_cents + (paid_amount_cents * DEPOSIT_FEE)
)
end
end

View File

@@ -0,0 +1,14 @@
# frozen_string_literal: true
class CreateDepositOrders < ActiveRecord::Migration[6.1]
def change
create_table(:deposit_orders) do |t|
t.references(:user, null: false, foreign_key: true)
t.string(:status, null: false)
t.integer(:received_amount_cents, null: false, default: 0)
t.integer(:paid_amount_cents, null: false, default: 0)
t.timestamps
end
end
end

View File

@@ -0,0 +1,6 @@
# frozen_string_literal: true
class EnableUuid < ActiveRecord::Migration[6.1]
def change
enable_extension("pgcrypto")
end
end

View File

@@ -0,0 +1,6 @@
# frozen_string_literal: true
class AddTransactionIdToDespoitOrder < ActiveRecord::Migration[6.1]
def change
add_column(:deposit_orders, :transaction_id, :uuid, default: "gen_random_uuid()", null: false)
end
end

15
db/schema.rb generated
View File

@@ -10,9 +10,10 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2021_08_28_041104) do ActiveRecord::Schema.define(version: 2021_09_06_021610) do
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "pgcrypto"
enable_extension "plpgsql" enable_extension "plpgsql"
create_table "active_storage_attachments", force: :cascade do |t| create_table "active_storage_attachments", force: :cascade do |t|
@@ -73,6 +74,17 @@ ActiveRecord::Schema.define(version: 2021_08_28_041104) do
t.index ["user_id"], name: "index_buy_crypto_orders_on_user_id" t.index ["user_id"], name: "index_buy_crypto_orders_on_user_id"
end end
create_table "deposit_orders", force: :cascade do |t|
t.bigint "user_id", null: false
t.string "status", null: false
t.integer "received_amount_cents", default: 0, null: false
t.integer "paid_amount_cents", default: 0, null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.uuid "transaction_id", default: -> { "gen_random_uuid()" }, null: false
t.index ["user_id"], name: "index_deposit_orders_on_user_id"
end
create_table "fiat_balances", force: :cascade do |t| create_table "fiat_balances", force: :cascade do |t|
t.bigint "user_id", null: false t.bigint "user_id", null: false
t.integer "amount_cents", default: 0, null: false t.integer "amount_cents", default: 0, null: false
@@ -139,6 +151,7 @@ ActiveRecord::Schema.define(version: 2021_08_28_041104) do
add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id" add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id"
add_foreign_key "balances", "users" add_foreign_key "balances", "users"
add_foreign_key "buy_crypto_orders", "users" add_foreign_key "buy_crypto_orders", "users"
add_foreign_key "deposit_orders", "users"
add_foreign_key "fiat_balances", "users" add_foreign_key "fiat_balances", "users"
add_foreign_key "sell_crypto_orders", "users" add_foreign_key "sell_crypto_orders", "users"
add_foreign_key "stake_orders", "users" add_foreign_key "stake_orders", "users"

221
erd.svg
View File

@@ -1,83 +1,106 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.43.0 (0) <!-- Generated by graphviz version 2.48.0 (0)
--> -->
<!-- Title: XStake Pages: 1 --> <!-- Title: XStake Pages: 1 -->
<svg width="606pt" height="674pt" <svg width="606pt" height="799pt"
viewBox="0.00 0.00 605.60 673.60" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> viewBox="0.00 0.00 605.60 798.60" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(28.8 644.8)"> <g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(28.8 769.8)">
<title>XStake</title> <title>XStake</title>
<polygon fill="white" stroke="transparent" points="-28.8,28.8 -28.8,-644.8 576.8,-644.8 576.8,28.8 -28.8,28.8"/> <polygon fill="white" stroke="transparent" points="-28.8,28.8 -28.8,-769.8 576.8,-769.8 576.8,28.8 -28.8,28.8"/>
<text text-anchor="middle" x="274" y="-601.6" font-family="Arial Bold" font-size="13.00">XStake domain model</text> <text text-anchor="middle" x="274" y="-726.6" font-family="Arial Bold" font-size="13.00">XStake domain model</text>
<!-- m_AdminUser --> <!-- m_AdminUser -->
<g id="node1" class="node"> <g id="node1" class="node">
<title>m_AdminUser</title> <title>m_AdminUser</title>
<path fill="none" stroke="black" d="M12,-100C12,-100 150,-100 150,-100 156,-100 162,-106 162,-112 162,-112 162,-183 162,-183 162,-189 156,-195 150,-195 150,-195 12,-195 12,-195 6,-195 0,-189 0,-183 0,-183 0,-112 0,-112 0,-106 6,-100 12,-100"/> <path fill="none" stroke="black" d="M12,-153C12,-153 150,-153 150,-153 156,-153 162,-159 162,-165 162,-165 162,-236 162,-236 162,-242 156,-248 150,-248 150,-248 12,-248 12,-248 6,-248 0,-242 0,-236 0,-236 0,-165 0,-165 0,-159 6,-153 12,-153"/>
<text text-anchor="start" x="49" y="-182.2" font-family="Arial Bold" font-size="11.00">AdminUser</text> <text text-anchor="start" x="49" y="-235.2" font-family="Arial Bold" font-size="11.00">AdminUser</text>
<polyline fill="none" stroke="black" points="0,-175 162,-175 "/> <polyline fill="none" stroke="black" points="0,-228 162,-228 "/>
<text text-anchor="start" x="7" y="-161.5" font-family="Arial" font-size="10.00">email </text> <text text-anchor="start" x="7" y="-214.5" font-family="Arial" font-size="10.00">email </text>
<text text-anchor="start" x="34" y="-161.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string U</text> <text text-anchor="start" x="34" y="-214.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string U</text>
<text text-anchor="start" x="7" y="-148.5" font-family="Arial" font-size="10.00">encrypted_password </text> <text text-anchor="start" x="7" y="-201.5" font-family="Arial" font-size="10.00">encrypted_password </text>
<text text-anchor="start" x="101" y="-148.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text> <text text-anchor="start" x="101" y="-201.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text>
<text text-anchor="start" x="7" y="-135.5" font-family="Arial" font-size="10.00">remember_created_at </text> <text text-anchor="start" x="7" y="-188.5" font-family="Arial" font-size="10.00">remember_created_at </text>
<text text-anchor="start" x="105" y="-135.5" font-family="Arial Italic" font-size="10.00" fill="#999999">datetime</text> <text text-anchor="start" x="105" y="-188.5" font-family="Arial Italic" font-size="10.00" fill="#999999">datetime</text>
<text text-anchor="start" x="7" y="-122.5" font-family="Arial" font-size="10.00">reset_password_sent_at </text> <text text-anchor="start" x="7" y="-175.5" font-family="Arial" font-size="10.00">reset_password_sent_at </text>
<text text-anchor="start" x="117" y="-122.5" font-family="Arial Italic" font-size="10.00" fill="#999999">datetime</text> <text text-anchor="start" x="117" y="-175.5" font-family="Arial Italic" font-size="10.00" fill="#999999">datetime</text>
<text text-anchor="start" x="7" y="-109.5" font-family="Arial" font-size="10.00">reset_password_token </text> <text text-anchor="start" x="7" y="-162.5" font-family="Arial" font-size="10.00">reset_password_token </text>
<text text-anchor="start" x="109" y="-109.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text> <text text-anchor="start" x="109" y="-162.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text>
</g> </g>
<!-- m_Balance --> <!-- m_Balance -->
<g id="node2" class="node"> <g id="node2" class="node">
<title>m_Balance</title> <title>m_Balance</title>
<path fill="none" stroke="black" d="M223,-522.5C223,-522.5 343,-522.5 343,-522.5 349,-522.5 355,-528.5 355,-534.5 355,-534.5 355,-566.5 355,-566.5 355,-572.5 349,-578.5 343,-578.5 343,-578.5 223,-578.5 223,-578.5 217,-578.5 211,-572.5 211,-566.5 211,-566.5 211,-534.5 211,-534.5 211,-528.5 217,-522.5 223,-522.5"/> <path fill="none" stroke="black" d="M223,-647.5C223,-647.5 343,-647.5 343,-647.5 349,-647.5 355,-653.5 355,-659.5 355,-659.5 355,-691.5 355,-691.5 355,-697.5 349,-703.5 343,-703.5 343,-703.5 223,-703.5 223,-703.5 217,-703.5 211,-697.5 211,-691.5 211,-691.5 211,-659.5 211,-659.5 211,-653.5 217,-647.5 223,-647.5"/>
<text text-anchor="start" x="259.5" y="-565.7" font-family="Arial Bold" font-size="11.00">Balance</text> <text text-anchor="start" x="259.5" y="-690.7" font-family="Arial Bold" font-size="11.00">Balance</text>
<polyline fill="none" stroke="black" points="211,-558.5 355,-558.5 "/> <polyline fill="none" stroke="black" points="211,-683.5 355,-683.5 "/>
<text text-anchor="start" x="218" y="-545.5" font-family="Arial" font-size="10.00">amount </text> <text text-anchor="start" x="218" y="-670.5" font-family="Arial" font-size="10.00">amount </text>
<text text-anchor="start" x="254" y="-545.5" font-family="Arial Italic" font-size="10.00" fill="#999999">decimal (20,10)</text> <text text-anchor="start" x="254" y="-670.5" font-family="Arial Italic" font-size="10.00" fill="#999999">decimal (20,10)</text>
<text text-anchor="start" x="218" y="-532.5" font-family="Arial" font-size="10.00">user_id </text> <text text-anchor="start" x="218" y="-657.5" font-family="Arial" font-size="10.00">user_id </text>
<text text-anchor="start" x="253" y="-532.5" font-family="Arial Italic" font-size="10.00" fill="#999999">integer (8) FK</text> <text text-anchor="start" x="253" y="-657.5" font-family="Arial Italic" font-size="10.00" fill="#999999">integer (8) FK</text>
</g> </g>
<!-- m_PaperTrail::Version --> <!-- m_PaperTrail::Version -->
<g id="node5" class="node"> <g id="node6" class="node">
<title>m_PaperTrail::Version</title> <title>m_PaperTrail::Version</title>
<path fill="none" stroke="black" d="M416,-400C416,-400 536,-400 536,-400 542,-400 548,-406 548,-412 548,-412 548,-483 548,-483 548,-489 542,-495 536,-495 536,-495 416,-495 416,-495 410,-495 404,-489 404,-483 404,-483 404,-412 404,-412 404,-406 410,-400 416,-400"/> <path fill="none" stroke="black" d="M416,-410C416,-410 536,-410 536,-410 542,-410 548,-416 548,-422 548,-422 548,-493 548,-493 548,-499 542,-505 536,-505 536,-505 416,-505 416,-505 410,-505 404,-499 404,-493 404,-493 404,-422 404,-422 404,-416 410,-410 416,-410"/>
<text text-anchor="start" x="423.5" y="-482.2" font-family="Arial Bold" font-size="11.00">PaperTrail::Version</text> <text text-anchor="start" x="423.5" y="-492.2" font-family="Arial Bold" font-size="11.00">PaperTrail::Version</text>
<polyline fill="none" stroke="black" points="404,-475 548,-475 "/> <polyline fill="none" stroke="black" points="404,-485 548,-485 "/>
<text text-anchor="start" x="411" y="-461.5" font-family="Arial" font-size="10.00">event </text> <text text-anchor="start" x="411" y="-471.5" font-family="Arial" font-size="10.00">event </text>
<text text-anchor="start" x="439" y="-461.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text> <text text-anchor="start" x="439" y="-471.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text>
<text text-anchor="start" x="411" y="-448.5" font-family="Arial" font-size="10.00">item_id </text> <text text-anchor="start" x="411" y="-458.5" font-family="Arial" font-size="10.00">item_id </text>
<text text-anchor="start" x="446" y="-448.5" font-family="Arial Italic" font-size="10.00" fill="#999999">integer (8) FK</text> <text text-anchor="start" x="446" y="-458.5" font-family="Arial Italic" font-size="10.00" fill="#999999">integer (8) FK</text>
<text text-anchor="start" x="411" y="-435.5" font-family="Arial" font-size="10.00">item_type </text> <text text-anchor="start" x="411" y="-445.5" font-family="Arial" font-size="10.00">item_type </text>
<text text-anchor="start" x="457" y="-435.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text> <text text-anchor="start" x="457" y="-445.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text>
<text text-anchor="start" x="411" y="-422.5" font-family="Arial" font-size="10.00">object </text> <text text-anchor="start" x="411" y="-432.5" font-family="Arial" font-size="10.00">object </text>
<text text-anchor="start" x="441" y="-422.5" font-family="Arial Italic" font-size="10.00" fill="#999999">text</text> <text text-anchor="start" x="441" y="-432.5" font-family="Arial Italic" font-size="10.00" fill="#999999">text</text>
<text text-anchor="start" x="411" y="-409.5" font-family="Arial" font-size="10.00">whodunnit </text> <text text-anchor="start" x="411" y="-419.5" font-family="Arial" font-size="10.00">whodunnit </text>
<text text-anchor="start" x="459" y="-409.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text> <text text-anchor="start" x="459" y="-419.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text>
</g> </g>
<!-- m_Balance&#45;&gt;m_PaperTrail::Version --> <!-- m_Balance&#45;&gt;m_PaperTrail::Version -->
<g id="edge1" class="edge"> <g id="edge1" class="edge">
<title>m_Balance&#45;&gt;m_PaperTrail::Version</title> <title>m_Balance&#45;&gt;m_PaperTrail::Version</title>
<path fill="none" stroke="black" d="M339.73,-522.35C349.2,-517.46 358.9,-512.38 368,-507.5 377,-502.67 386.38,-497.55 395.69,-492.41"/> <path fill="none" stroke="black" d="M348.4,-647.33C355.4,-642.9 362.11,-637.96 368,-632.5 404.05,-599.08 432.34,-550.81 450.75,-513.42"/>
<polygon fill="black" stroke="black" points="397.49,-495.02 403.84,-487.9 394.44,-489.5 397.49,-495.02"/> <polygon fill="black" stroke="black" points="453.67,-514.61 454.76,-505.14 448,-511.87 453.67,-514.61"/>
</g> </g>
<!-- m_BuyCryptoOrder --> <!-- m_BuyCryptoOrder -->
<g id="node3" class="node"> <g id="node3" class="node">
<title>m_BuyCryptoOrder</title> <title>m_BuyCryptoOrder</title>
<path fill="none" stroke="black" d="M210,-410.5C210,-410.5 356,-410.5 356,-410.5 362,-410.5 368,-416.5 368,-422.5 368,-422.5 368,-480.5 368,-480.5 368,-486.5 362,-492.5 356,-492.5 356,-492.5 210,-492.5 210,-492.5 204,-492.5 198,-486.5 198,-480.5 198,-480.5 198,-422.5 198,-422.5 198,-416.5 204,-410.5 210,-410.5"/> <path fill="none" stroke="black" d="M210,-535.5C210,-535.5 356,-535.5 356,-535.5 362,-535.5 368,-541.5 368,-547.5 368,-547.5 368,-605.5 368,-605.5 368,-611.5 362,-617.5 356,-617.5 356,-617.5 210,-617.5 210,-617.5 204,-617.5 198,-611.5 198,-605.5 198,-605.5 198,-547.5 198,-547.5 198,-541.5 204,-535.5 210,-535.5"/>
<text text-anchor="start" x="237" y="-479.7" font-family="Arial Bold" font-size="11.00">BuyCryptoOrder</text> <text text-anchor="start" x="237" y="-604.7" font-family="Arial Bold" font-size="11.00">BuyCryptoOrder</text>
<polyline fill="none" stroke="black" points="198,-472.5 368,-472.5 "/> <polyline fill="none" stroke="black" points="198,-597.5 368,-597.5 "/>
<text text-anchor="start" x="205" y="-459.5" font-family="Arial" font-size="10.00">paid_amount_cents </text> <text text-anchor="start" x="205" y="-584.5" font-family="Arial" font-size="10.00">paid_amount_cents </text>
<text text-anchor="start" x="293" y="-459.5" font-family="Arial Italic" font-size="10.00" fill="#999999">integer</text> <text text-anchor="start" x="293" y="-584.5" font-family="Arial Italic" font-size="10.00" fill="#999999">integer</text>
<text text-anchor="start" x="205" y="-446.5" font-family="Arial" font-size="10.00">received_amount </text> <text text-anchor="start" x="205" y="-571.5" font-family="Arial" font-size="10.00">received_amount </text>
<text text-anchor="start" x="283" y="-446.5" font-family="Arial Italic" font-size="10.00" fill="#999999">decimal (20,10)</text> <text text-anchor="start" x="283" y="-571.5" font-family="Arial Italic" font-size="10.00" fill="#999999">decimal (20,10)</text>
<text text-anchor="start" x="205" y="-433.5" font-family="Arial" font-size="10.00">status </text> <text text-anchor="start" x="205" y="-558.5" font-family="Arial" font-size="10.00">status </text>
<text text-anchor="start" x="236" y="-433.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text> <text text-anchor="start" x="236" y="-558.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text>
<text text-anchor="start" x="205" y="-420.5" font-family="Arial" font-size="10.00">user_id </text> <text text-anchor="start" x="205" y="-545.5" font-family="Arial" font-size="10.00">user_id </text>
<text text-anchor="start" x="240" y="-420.5" font-family="Arial Italic" font-size="10.00" fill="#999999">integer (8) FK</text> <text text-anchor="start" x="240" y="-545.5" font-family="Arial Italic" font-size="10.00" fill="#999999">integer (8) FK</text>
</g>
<!-- m_DepositOrder -->
<g id="node4" class="node">
<title>m_DepositOrder</title>
<path fill="none" stroke="black" d="M214.5,-410C214.5,-410 351.5,-410 351.5,-410 357.5,-410 363.5,-416 363.5,-422 363.5,-422 363.5,-493 363.5,-493 363.5,-499 357.5,-505 351.5,-505 351.5,-505 214.5,-505 214.5,-505 208.5,-505 202.5,-499 202.5,-493 202.5,-493 202.5,-422 202.5,-422 202.5,-416 208.5,-410 214.5,-410"/>
<text text-anchor="start" x="245.5" y="-492.2" font-family="Arial Bold" font-size="11.00">DepositOrder</text>
<polyline fill="none" stroke="black" points="202.5,-485 363.5,-485 "/>
<text text-anchor="start" x="210" y="-471.5" font-family="Arial" font-size="10.00">paid_amount_cents </text>
<text text-anchor="start" x="298" y="-471.5" font-family="Arial Italic" font-size="10.00" fill="#999999">integer</text>
<text text-anchor="start" x="210" y="-458.5" font-family="Arial" font-size="10.00">received_amount_cents </text>
<text text-anchor="start" x="317" y="-458.5" font-family="Arial Italic" font-size="10.00" fill="#999999">integer</text>
<text text-anchor="start" x="210" y="-445.5" font-family="Arial" font-size="10.00">status </text>
<text text-anchor="start" x="241" y="-445.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text>
<text text-anchor="start" x="210" y="-432.5" font-family="Arial" font-size="10.00">transaction_id </text>
<text text-anchor="start" x="274" y="-432.5" font-family="Arial Italic" font-size="10.00" fill="#999999">uuid</text>
<text text-anchor="start" x="210" y="-419.5" font-family="Arial" font-size="10.00">user_id </text>
<text text-anchor="start" x="245" y="-419.5" font-family="Arial Italic" font-size="10.00" fill="#999999">integer (8) FK</text>
</g>
<!-- m_DepositOrder&#45;&gt;m_PaperTrail::Version -->
<g id="edge2" class="edge">
<title>m_DepositOrder&#45;&gt;m_PaperTrail::Version</title>
<path fill="none" stroke="black" d="M363.62,-457.5C373.81,-457.5 384.24,-457.5 394.44,-457.5"/>
<polygon fill="black" stroke="black" points="394.74,-460.65 403.74,-457.5 394.74,-454.35 394.74,-460.65"/>
</g> </g>
<!-- m_FiatBalance --> <!-- m_FiatBalance -->
<g id="node4" class="node"> <g id="node5" class="node">
<title>m_FiatBalance</title> <title>m_FiatBalance</title>
<path fill="none" stroke="black" d="M223,-311C223,-311 343,-311 343,-311 349,-311 355,-317 355,-323 355,-323 355,-368 355,-368 355,-374 349,-380 343,-380 343,-380 223,-380 223,-380 217,-380 211,-374 211,-368 211,-368 211,-323 211,-323 211,-317 217,-311 223,-311"/> <path fill="none" stroke="black" d="M223,-311C223,-311 343,-311 343,-311 349,-311 355,-317 355,-323 355,-323 355,-368 355,-368 355,-374 349,-380 343,-380 343,-380 223,-380 223,-380 217,-380 211,-374 211,-368 211,-368 211,-323 211,-323 211,-317 217,-311 223,-311"/>
<text text-anchor="start" x="250" y="-367.2" font-family="Arial Bold" font-size="11.00">FiatBalance</text> <text text-anchor="start" x="250" y="-367.2" font-family="Arial Bold" font-size="11.00">FiatBalance</text>
@@ -90,13 +113,13 @@
<text text-anchor="start" x="253" y="-320.5" font-family="Arial Italic" font-size="10.00" fill="#999999">integer (8) FK</text> <text text-anchor="start" x="253" y="-320.5" font-family="Arial Italic" font-size="10.00" fill="#999999">integer (8) FK</text>
</g> </g>
<!-- m_FiatBalance&#45;&gt;m_PaperTrail::Version --> <!-- m_FiatBalance&#45;&gt;m_PaperTrail::Version -->
<g id="edge2" class="edge"> <g id="edge3" class="edge">
<title>m_FiatBalance&#45;&gt;m_PaperTrail::Version</title> <title>m_FiatBalance&#45;&gt;m_PaperTrail::Version</title>
<path fill="none" stroke="black" d="M348.66,-380.03C363.78,-388.1 380.05,-396.79 395.72,-405.16"/> <path fill="none" stroke="black" d="M342.86,-380.02C359.59,-389.83 378.09,-400.67 395.82,-411.07"/>
<polygon fill="black" stroke="black" points="394.42,-408.04 403.84,-409.5 397.39,-402.48 394.42,-408.04"/> <polygon fill="black" stroke="black" points="394.54,-413.97 403.9,-415.81 397.73,-408.54 394.54,-413.97"/>
</g> </g>
<!-- m_SellCryptoOrder --> <!-- m_SellCryptoOrder -->
<g id="node6" class="node"> <g id="node7" class="node">
<title>m_SellCryptoOrder</title> <title>m_SellCryptoOrder</title>
<path fill="none" stroke="black" d="M214.5,-198.5C214.5,-198.5 351.5,-198.5 351.5,-198.5 357.5,-198.5 363.5,-204.5 363.5,-210.5 363.5,-210.5 363.5,-268.5 363.5,-268.5 363.5,-274.5 357.5,-280.5 351.5,-280.5 351.5,-280.5 214.5,-280.5 214.5,-280.5 208.5,-280.5 202.5,-274.5 202.5,-268.5 202.5,-268.5 202.5,-210.5 202.5,-210.5 202.5,-204.5 208.5,-198.5 214.5,-198.5"/> <path fill="none" stroke="black" d="M214.5,-198.5C214.5,-198.5 351.5,-198.5 351.5,-198.5 357.5,-198.5 363.5,-204.5 363.5,-210.5 363.5,-210.5 363.5,-268.5 363.5,-268.5 363.5,-274.5 357.5,-280.5 351.5,-280.5 351.5,-280.5 214.5,-280.5 214.5,-280.5 208.5,-280.5 202.5,-274.5 202.5,-268.5 202.5,-268.5 202.5,-210.5 202.5,-210.5 202.5,-204.5 208.5,-198.5 214.5,-198.5"/>
<text text-anchor="start" x="238" y="-267.7" font-family="Arial Bold" font-size="11.00">SellCryptoOrder</text> <text text-anchor="start" x="238" y="-267.7" font-family="Arial Bold" font-size="11.00">SellCryptoOrder</text>
@@ -111,7 +134,7 @@
<text text-anchor="start" x="245" y="-208.5" font-family="Arial Italic" font-size="10.00" fill="#999999">integer (8) FK</text> <text text-anchor="start" x="245" y="-208.5" font-family="Arial Italic" font-size="10.00" fill="#999999">integer (8) FK</text>
</g> </g>
<!-- m_StakeOrder --> <!-- m_StakeOrder -->
<g id="node7" class="node"> <g id="node8" class="node">
<title>m_StakeOrder</title> <title>m_StakeOrder</title>
<path fill="none" stroke="black" d="M223,-86.5C223,-86.5 343,-86.5 343,-86.5 349,-86.5 355,-92.5 355,-98.5 355,-98.5 355,-156.5 355,-156.5 355,-162.5 349,-168.5 343,-168.5 343,-168.5 223,-168.5 223,-168.5 217,-168.5 211,-162.5 211,-156.5 211,-156.5 211,-98.5 211,-98.5 211,-92.5 217,-86.5 223,-86.5"/> <path fill="none" stroke="black" d="M223,-86.5C223,-86.5 343,-86.5 343,-86.5 349,-86.5 355,-92.5 355,-98.5 355,-98.5 355,-156.5 355,-156.5 355,-162.5 349,-168.5 343,-168.5 343,-168.5 223,-168.5 223,-168.5 217,-168.5 211,-162.5 211,-156.5 211,-156.5 211,-98.5 211,-98.5 211,-92.5 217,-86.5 223,-86.5"/>
<text text-anchor="start" x="251" y="-155.7" font-family="Arial Bold" font-size="11.00">StakeOrder</text> <text text-anchor="start" x="251" y="-155.7" font-family="Arial Bold" font-size="11.00">StakeOrder</text>
@@ -126,58 +149,64 @@
<text text-anchor="start" x="253" y="-96.5" font-family="Arial Italic" font-size="10.00" fill="#999999">integer (8) FK</text> <text text-anchor="start" x="253" y="-96.5" font-family="Arial Italic" font-size="10.00" fill="#999999">integer (8) FK</text>
</g> </g>
<!-- m_User --> <!-- m_User -->
<g id="node8" class="node"> <g id="node9" class="node">
<title>m_User</title> <title>m_User</title>
<path fill="none" stroke="black" d="M12,-225.5C12,-225.5 150,-225.5 150,-225.5 156,-225.5 162,-231.5 162,-237.5 162,-237.5 162,-347.5 162,-347.5 162,-353.5 156,-359.5 150,-359.5 150,-359.5 12,-359.5 12,-359.5 6,-359.5 0,-353.5 0,-347.5 0,-347.5 0,-237.5 0,-237.5 0,-231.5 6,-225.5 12,-225.5"/> <path fill="none" stroke="black" d="M12,-278.5C12,-278.5 150,-278.5 150,-278.5 156,-278.5 162,-284.5 162,-290.5 162,-290.5 162,-400.5 162,-400.5 162,-406.5 156,-412.5 150,-412.5 150,-412.5 12,-412.5 12,-412.5 6,-412.5 0,-406.5 0,-400.5 0,-400.5 0,-290.5 0,-290.5 0,-284.5 6,-278.5 12,-278.5"/>
<text text-anchor="start" x="66.5" y="-346.7" font-family="Arial Bold" font-size="11.00">User</text> <text text-anchor="start" x="66.5" y="-399.7" font-family="Arial Bold" font-size="11.00">User</text>
<polyline fill="none" stroke="black" points="0,-339.5 162,-339.5 "/> <polyline fill="none" stroke="black" points="0,-392.5 162,-392.5 "/>
<text text-anchor="start" x="7" y="-326.5" font-family="Arial" font-size="10.00">email </text> <text text-anchor="start" x="7" y="-379.5" font-family="Arial" font-size="10.00">email </text>
<text text-anchor="start" x="34" y="-326.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string U</text> <text text-anchor="start" x="34" y="-379.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string U</text>
<text text-anchor="start" x="7" y="-313.5" font-family="Arial" font-size="10.00">encrypted_password </text> <text text-anchor="start" x="7" y="-366.5" font-family="Arial" font-size="10.00">encrypted_password </text>
<text text-anchor="start" x="101" y="-313.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text> <text text-anchor="start" x="101" y="-366.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text>
<text text-anchor="start" x="7" y="-300.5" font-family="Arial" font-size="10.00">first_name </text> <text text-anchor="start" x="7" y="-353.5" font-family="Arial" font-size="10.00">first_name </text>
<text text-anchor="start" x="56" y="-300.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text> <text text-anchor="start" x="56" y="-353.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text>
<text text-anchor="start" x="7" y="-287.5" font-family="Arial" font-size="10.00">last_name </text> <text text-anchor="start" x="7" y="-340.5" font-family="Arial" font-size="10.00">last_name </text>
<text text-anchor="start" x="56" y="-287.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text> <text text-anchor="start" x="56" y="-340.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text>
<text text-anchor="start" x="7" y="-274.5" font-family="Arial" font-size="10.00">remember_created_at </text> <text text-anchor="start" x="7" y="-327.5" font-family="Arial" font-size="10.00">remember_created_at </text>
<text text-anchor="start" x="105" y="-274.5" font-family="Arial Italic" font-size="10.00" fill="#999999">datetime</text> <text text-anchor="start" x="105" y="-327.5" font-family="Arial Italic" font-size="10.00" fill="#999999">datetime</text>
<text text-anchor="start" x="7" y="-261.5" font-family="Arial" font-size="10.00">reset_password_sent_at </text> <text text-anchor="start" x="7" y="-314.5" font-family="Arial" font-size="10.00">reset_password_sent_at </text>
<text text-anchor="start" x="117" y="-261.5" font-family="Arial Italic" font-size="10.00" fill="#999999">datetime</text> <text text-anchor="start" x="117" y="-314.5" font-family="Arial Italic" font-size="10.00" fill="#999999">datetime</text>
<text text-anchor="start" x="7" y="-248.5" font-family="Arial" font-size="10.00">reset_password_token </text> <text text-anchor="start" x="7" y="-301.5" font-family="Arial" font-size="10.00">reset_password_token </text>
<text text-anchor="start" x="109" y="-248.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text> <text text-anchor="start" x="109" y="-301.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text>
<text text-anchor="start" x="7" y="-235.5" font-family="Arial" font-size="10.00">wallet_address </text> <text text-anchor="start" x="7" y="-288.5" font-family="Arial" font-size="10.00">wallet_address </text>
<text text-anchor="start" x="76" y="-235.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text> <text text-anchor="start" x="76" y="-288.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text>
</g> </g>
<!-- m_User&#45;&gt;m_Balance --> <!-- m_User&#45;&gt;m_Balance -->
<g id="edge5" class="edge"> <g id="edge6" class="edge">
<title>m_User&#45;&gt;m_Balance</title> <title>m_User&#45;&gt;m_Balance</title>
<path fill="none" stroke="black" d="M105.93,-359.84C125.07,-405.99 155.71,-466.12 198,-507.5 203.62,-513 210.09,-517.95 216.88,-522.36"/> <path fill="none" stroke="black" d="M94.93,-412.53C110.13,-475.8 140.87,-570.04 198,-632.5 203.09,-638.06 209.06,-643.01 215.43,-647.39"/>
</g> </g>
<!-- m_User&#45;&gt;m_BuyCryptoOrder --> <!-- m_User&#45;&gt;m_BuyCryptoOrder -->
<g id="edge7" class="edge"> <g id="edge9" class="edge">
<title>m_User&#45;&gt;m_BuyCryptoOrder</title> <title>m_User&#45;&gt;m_BuyCryptoOrder</title>
<path fill="none" stroke="black" d="M154.65,-359.73C168.74,-371.99 183.61,-384.4 198,-395.5 202.09,-398.65 206.35,-401.83 210.69,-404.97"/> <path fill="none" stroke="black" d="M118.01,-412.84C138.55,-447.46 166.47,-488.88 198,-520.5 201.09,-523.59 204.37,-526.62 207.78,-529.55"/>
<polygon fill="black" stroke="black" points="208.89,-407.55 218.05,-410.22 212.55,-402.42 208.89,-407.55"/> <polygon fill="black" stroke="black" points="205.99,-532.16 214.94,-535.45 210,-527.3 205.99,-532.16"/>
</g>
<!-- m_User&#45;&gt;m_DepositOrder -->
<g id="edge8" class="edge">
<title>m_User&#45;&gt;m_DepositOrder</title>
<path fill="none" stroke="black" d="M162.2,-390.41C172.76,-396.33 183.63,-402.41 194.32,-408.4"/>
<polygon fill="black" stroke="black" points="193.05,-411.3 202.44,-412.95 196.12,-405.8 193.05,-411.3"/>
</g> </g>
<!-- m_User&#45;&gt;m_FiatBalance --> <!-- m_User&#45;&gt;m_FiatBalance -->
<g id="edge6" class="edge"> <g id="edge7" class="edge">
<title>m_User&#45;&gt;m_FiatBalance</title> <title>m_User&#45;&gt;m_FiatBalance</title>
<path fill="none" stroke="black" d="M162.2,-313.75C178.28,-318.01 195.08,-322.46 210.83,-326.64"/> <path fill="none" stroke="black" d="M162.2,-345.5C178.28,-345.5 195.08,-345.5 210.83,-345.5"/>
</g> </g>
<!-- m_User&#45;&gt;m_SellCryptoOrder --> <!-- m_User&#45;&gt;m_SellCryptoOrder -->
<g id="edge8" class="edge"> <g id="edge10" class="edge">
<title>m_User&#45;&gt;m_SellCryptoOrder</title> <title>m_User&#45;&gt;m_SellCryptoOrder</title>
<path fill="none" stroke="black" d="M162.2,-271.25C172.55,-268.5 183.21,-265.68 193.69,-262.9"/> <path fill="none" stroke="black" d="M162.2,-303C173.39,-297.06 184.93,-290.95 196.22,-284.96"/>
<polygon fill="black" stroke="black" points="194.55,-265.93 202.44,-260.58 192.93,-259.84 194.55,-265.93"/> <polygon fill="black" stroke="black" points="197.91,-287.63 204.39,-280.63 194.96,-282.07 197.91,-287.63"/>
</g> </g>
<!-- m_User&#45;&gt;m_StakeOrder --> <!-- m_User&#45;&gt;m_StakeOrder -->
<g id="edge4" class="edge"> <g id="edge5" class="edge">
<title>m_User&#45;&gt;m_StakeOrder</title> <title>m_User&#45;&gt;m_StakeOrder</title>
<path fill="none" stroke="black" d="M149.62,-225.41C165.09,-211.08 181.77,-196.39 198,-183.5 202.04,-180.29 206.27,-177.07 210.58,-173.9"/> <path fill="none" stroke="black" d="M151.11,-278.14C154.97,-273.33 158.64,-268.43 162,-263.5 183.95,-231.28 172.8,-213.25 198,-183.5 200.49,-180.57 203.16,-177.72 205.98,-174.98"/>
<polygon fill="black" stroke="black" points="212.46,-176.43 217.91,-168.6 208.77,-171.32 212.46,-176.43"/> <polygon fill="black" stroke="black" points="208.27,-177.15 212.78,-168.75 204.01,-172.51 208.27,-177.15"/>
</g> </g>
<!-- m_UserDocument --> <!-- m_UserDocument -->
<g id="node9" class="node"> <g id="node10" class="node">
<title>m_UserDocument</title> <title>m_UserDocument</title>
<path fill="none" stroke="black" d="M223,-0.5C223,-0.5 343,-0.5 343,-0.5 349,-0.5 355,-6.5 355,-12.5 355,-12.5 355,-44.5 355,-44.5 355,-50.5 349,-56.5 343,-56.5 343,-56.5 223,-56.5 223,-56.5 217,-56.5 211,-50.5 211,-44.5 211,-44.5 211,-12.5 211,-12.5 211,-6.5 217,-0.5 223,-0.5"/> <path fill="none" stroke="black" d="M223,-0.5C223,-0.5 343,-0.5 343,-0.5 349,-0.5 355,-6.5 355,-12.5 355,-12.5 355,-44.5 355,-44.5 355,-50.5 349,-56.5 343,-56.5 343,-56.5 223,-56.5 223,-56.5 217,-56.5 211,-50.5 211,-44.5 211,-44.5 211,-12.5 211,-12.5 211,-6.5 217,-0.5 223,-0.5"/>
<text text-anchor="start" x="241.5" y="-43.7" font-family="Arial Bold" font-size="11.00">UserDocument</text> <text text-anchor="start" x="241.5" y="-43.7" font-family="Arial Bold" font-size="11.00">UserDocument</text>
@@ -188,10 +217,10 @@
<text text-anchor="start" x="253" y="-10.5" font-family="Arial Italic" font-size="10.00" fill="#999999">integer (8) FK</text> <text text-anchor="start" x="253" y="-10.5" font-family="Arial Italic" font-size="10.00" fill="#999999">integer (8) FK</text>
</g> </g>
<!-- m_User&#45;&gt;m_UserDocument --> <!-- m_User&#45;&gt;m_UserDocument -->
<g id="edge3" class="edge"> <g id="edge4" class="edge">
<title>m_User&#45;&gt;m_UserDocument</title> <title>m_User&#45;&gt;m_UserDocument</title>
<path fill="none" stroke="black" d="M152.47,-225.27C155.95,-220.46 159.17,-215.52 162,-210.5 193.33,-154.91 158.09,-121.3 198,-71.5 200.61,-68.25 203.52,-65.22 206.66,-62.4"/> <path fill="none" stroke="black" d="M152.88,-278.49C156.26,-273.63 159.34,-268.62 162,-263.5 202.03,-186.46 146.05,-141.06 198,-71.5 200.37,-68.33 203.04,-65.37 205.94,-62.61"/>
<polygon fill="black" stroke="black" points="208.86,-64.67 213.87,-56.55 204.89,-59.78 208.86,-64.67"/> <polygon fill="black" stroke="black" points="208.26,-64.78 213.07,-56.55 204.17,-59.98 208.26,-64.78"/>
</g> </g>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -31,9 +31,11 @@
"babel-plugin-relay": "^11.0.2", "babel-plugin-relay": "^11.0.2",
"bignumber.js": "^9.0.1", "bignumber.js": "^9.0.1",
"classnames": "^2.3.1", "classnames": "^2.3.1",
"copy-to-clipboard": "^3.3.1",
"ethers": "^5.4.4", "ethers": "^5.4.4",
"graphql-scalars": "^1.10.0", "graphql-scalars": "^1.10.0",
"postcss": "^7", "postcss": "^7",
"qrcode-pix": "^3.0.3",
"ramda": "^0.27.1", "ramda": "^0.27.1",
"react": "^17.0.2", "react": "^17.0.2",
"react-dom": "^17.0.2", "react-dom": "^17.0.2",

View File

@@ -0,0 +1,29 @@
# frozen_string_literal: true
# == Schema Information
#
# Table name: deposit_orders
#
# id :bigint not null, primary key
# paid_amount_cents :integer default(0), not null
# received_amount_cents :integer default(0), not null
# status :string not null
# created_at :datetime not null
# updated_at :datetime not null
# transaction_id :uuid not null
# user_id :bigint not null
#
# Indexes
#
# index_deposit_orders_on_user_id (user_id)
#
# Foreign Keys
#
# fk_rails_... (user_id => users.id)
#
FactoryBot.define do
factory :deposit_order do
user { nil }
status { "MyString" }
end
end

View File

@@ -0,0 +1,28 @@
# frozen_string_literal: true
# == Schema Information
#
# Table name: deposit_orders
#
# id :bigint not null, primary key
# paid_amount_cents :integer default(0), not null
# received_amount_cents :integer default(0), not null
# status :string not null
# created_at :datetime not null
# updated_at :datetime not null
# transaction_id :uuid not null
# user_id :bigint not null
#
# Indexes
#
# index_deposit_orders_on_user_id (user_id)
#
# Foreign Keys
#
# fk_rails_... (user_id => users.id)
#
require "rails_helper"
RSpec.describe(DepositOrder, type: :model) do
pending "add some examples to (or delete) #{__FILE__}"
end

209
yarn.lock generated
View File

@@ -1053,6 +1053,13 @@
dependencies: dependencies:
regenerator-runtime "^0.13.4" regenerator-runtime "^0.13.4"
"@babel/runtime@^7.10.5":
version "7.15.4"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.15.4.tgz#fd17d16bfdf878e6dd02d19753a39fa8a8d9c84a"
integrity sha512-99catp6bHCaxr4sJ/DbTGgHS4+Rs2RVd2g7iOap6SLGPDknRK9ztKNsE/Fg6QhSeh1FGE5f6gHGQmvvn3I3xhw==
dependencies:
regenerator-runtime "^0.13.4"
"@babel/template@^7.14.5": "@babel/template@^7.14.5":
version "7.14.5" version "7.14.5"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.14.5.tgz#a9bc9d8b33354ff6e55a9c60d1109200a68974f4" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.14.5.tgz#a9bc9d8b33354ff6e55a9c60d1109200a68974f4"
@@ -1491,6 +1498,17 @@
resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz#87de7af9c231826fdd68ac7258f77c429e0e5fcf" resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz#87de7af9c231826fdd68ac7258f77c429e0e5fcf"
integrity sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w== integrity sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==
"@jest/types@^26.6.2":
version "26.6.2"
resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.2.tgz#bef5a532030e1d88a2f5a6d933f84e97226ed48e"
integrity sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==
dependencies:
"@types/istanbul-lib-coverage" "^2.0.0"
"@types/istanbul-reports" "^3.0.0"
"@types/node" "*"
"@types/yargs" "^15.0.0"
chalk "^4.0.0"
"@nodelib/fs.scandir@2.1.5": "@nodelib/fs.scandir@2.1.5":
version "2.1.5" version "2.1.5"
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5"
@@ -1594,6 +1612,33 @@
resolved "https://registry.yarnpkg.com/@types/history/-/history-4.7.9.tgz#1cfb6d60ef3822c589f18e70f8b12f9a28ce8724" resolved "https://registry.yarnpkg.com/@types/history/-/history-4.7.9.tgz#1cfb6d60ef3822c589f18e70f8b12f9a28ce8724"
integrity sha512-MUc6zSmU3tEVnkQ78q0peeEjKWPUADMlC/t++2bI8WnAG2tvYRPIgHG8lWkXwqc8MsUF6Z2MOf+Mh5sazOmhiQ== integrity sha512-MUc6zSmU3tEVnkQ78q0peeEjKWPUADMlC/t++2bI8WnAG2tvYRPIgHG8lWkXwqc8MsUF6Z2MOf+Mh5sazOmhiQ==
"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0":
version "2.0.3"
resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz#4ba8ddb720221f432e443bd5f9117fd22cfd4762"
integrity sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw==
"@types/istanbul-lib-report@*":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#c14c24f18ea8190c118ee7562b7ff99a36552686"
integrity sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==
dependencies:
"@types/istanbul-lib-coverage" "*"
"@types/istanbul-reports@^3.0.0":
version "3.0.1"
resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz#9153fe98bba2bd565a63add9436d6f0d7f8468ff"
integrity sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==
dependencies:
"@types/istanbul-lib-report" "*"
"@types/jest@^26.0.15":
version "26.0.24"
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.24.tgz#943d11976b16739185913a1936e0de0c4a7d595a"
integrity sha512-E/X5Vib8BWqZNRlDxj9vYXhsDwPYbPINqKF9BsnSoon4RQ0D9moEuLD8txgyypFLH7J4+Lho9Nr/c8H0Fi+17w==
dependencies:
jest-diff "^26.0.0"
pretty-format "^26.0.0"
"@types/json-schema@^7.0.5", "@types/json-schema@^7.0.7", "@types/json-schema@^7.0.8": "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.7", "@types/json-schema@^7.0.8":
version "7.0.9" version "7.0.9"
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d"
@@ -1682,6 +1727,18 @@
resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39" resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39"
integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew== integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==
"@types/yargs-parser@*":
version "20.2.1"
resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-20.2.1.tgz#3b9ce2489919d9e4fea439b76916abc34b2df129"
integrity sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw==
"@types/yargs@^15.0.0":
version "15.0.14"
resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.14.tgz#26d821ddb89e70492160b66d10a0eb6df8f6fb06"
integrity sha512-yEJzHoxf6SyQGhBhIYGXQDSCkJjB6HohDShto7m8vaKg9Yp0Yn8+71J9eakh2bnPg6BfsH9PRMhiRTZnd4eXGQ==
dependencies:
"@types/yargs-parser" "*"
"@typescript-eslint/eslint-plugin@^4.28.0": "@typescript-eslint/eslint-plugin@^4.28.0":
version "4.29.0" version "4.29.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.29.0.tgz#b866c9cd193bfaba5e89bade0015629ebeb27996" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.29.0.tgz#b866c9cd193bfaba5e89bade0015629ebeb27996"
@@ -2345,7 +2402,7 @@ balanced-match@^1.0.0:
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
base64-js@^1.0.2: base64-js@^1.0.2, base64-js@^1.3.1:
version "1.5.1" version "1.5.1"
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==
@@ -2563,7 +2620,25 @@ bser@2.1.1:
dependencies: dependencies:
node-int64 "^0.4.0" node-int64 "^0.4.0"
buffer-from@^1.0.0: buffer-alloc-unsafe@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0"
integrity sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==
buffer-alloc@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec"
integrity sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==
dependencies:
buffer-alloc-unsafe "^1.1.0"
buffer-fill "^1.0.0"
buffer-fill@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c"
integrity sha1-+PeLdniYiO858gXNY39o5wISKyw=
buffer-from@^1.0.0, buffer-from@^1.1.1:
version "1.1.2" version "1.1.2"
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5"
integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==
@@ -2587,6 +2662,14 @@ buffer@^4.3.0:
ieee754 "^1.1.4" ieee754 "^1.1.4"
isarray "^1.0.0" isarray "^1.0.0"
buffer@^5.4.3:
version "5.7.1"
resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0"
integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==
dependencies:
base64-js "^1.3.1"
ieee754 "^1.1.13"
builtin-status-codes@^3.0.0: builtin-status-codes@^3.0.0:
version "3.0.0" version "3.0.0"
resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8"
@@ -3039,6 +3122,13 @@ copy-descriptor@^0.1.0:
resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d"
integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=
copy-to-clipboard@^3.3.1:
version "3.3.1"
resolved "https://registry.yarnpkg.com/copy-to-clipboard/-/copy-to-clipboard-3.3.1.tgz#115aa1a9998ffab6196f93076ad6da3b913662ae"
integrity sha512-i13qo6kIHTTpCm8/Wup+0b1mVWETvu2kIMzKoK8FpkLkFxlt0znUAHcMzox+T8sPlqtZXq3CulEjQHsYiGFJUw==
dependencies:
toggle-selection "^1.0.6"
core-js-compat@^3.14.0, core-js-compat@^3.16.0: core-js-compat@^3.14.0, core-js-compat@^3.16.0:
version "3.16.0" version "3.16.0"
resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.16.0.tgz#fced4a0a534e7e02f7e084bff66c701f8281805f" resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.16.0.tgz#fced4a0a534e7e02f7e084bff66c701f8281805f"
@@ -3519,6 +3609,11 @@ didyoumean@^1.2.2:
resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.2.tgz#989346ffe9e839b4555ecf5666edea0d3e8ad037" resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.2.tgz#989346ffe9e839b4555ecf5666edea0d3e8ad037"
integrity sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw== integrity sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==
diff-sequences@^26.6.2:
version "26.6.2"
resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.6.2.tgz#48ba99157de1923412eed41db6b6d4aa9ca7c0b1"
integrity sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==
diffie-hellman@^5.0.0: diffie-hellman@^5.0.0:
version "5.0.3" version "5.0.3"
resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875"
@@ -3528,6 +3623,11 @@ diffie-hellman@^5.0.0:
miller-rabin "^4.0.0" miller-rabin "^4.0.0"
randombytes "^2.0.0" randombytes "^2.0.0"
dijkstrajs@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/dijkstrajs/-/dijkstrajs-1.0.2.tgz#2e48c0d3b825462afe75ab4ad5e829c8ece36257"
integrity sha512-QV6PMaHTCNmKSeP6QoXhVTw9snc9VD8MulTT0Bd99Pacp4SS1cjcrYPgBPmibqKVtMJJfqC6XvOXgPMEEPH/fg==
dir-glob@^3.0.1: dir-glob@^3.0.1:
version "3.0.1" version "3.0.1"
resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f"
@@ -4946,7 +5046,7 @@ icss-utils@^4.0.0, icss-utils@^4.1.1:
dependencies: dependencies:
postcss "^7.0.14" postcss "^7.0.14"
ieee754@^1.1.4: ieee754@^1.1.13, ieee754@^1.1.4:
version "1.2.1" version "1.2.1"
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352"
integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==
@@ -5407,6 +5507,11 @@ isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0:
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=
isarray@^2.0.1:
version "2.0.5"
resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723"
integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==
isexe@^2.0.0: isexe@^2.0.0:
version "2.0.0" version "2.0.0"
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
@@ -5424,6 +5529,21 @@ isobject@^3.0.0, isobject@^3.0.1:
resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8=
jest-diff@^26.0.0:
version "26.6.2"
resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-26.6.2.tgz#1aa7468b52c3a68d7d5c5fdcdfcd5e49bd164394"
integrity sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA==
dependencies:
chalk "^4.0.0"
diff-sequences "^26.6.2"
jest-get-type "^26.3.0"
pretty-format "^26.6.2"
jest-get-type@^26.3.0:
version "26.3.0"
resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-26.3.0.tgz#e97dc3c3f53c2b406ca7afaed4493b1d099199e0"
integrity sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig==
jest-worker@^26.5.0: jest-worker@^26.5.0:
version "26.6.2" version "26.6.2"
resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed"
@@ -5657,6 +5777,11 @@ locate-path@^6.0.0:
dependencies: dependencies:
p-locate "^5.0.0" p-locate "^5.0.0"
lodash-es@^4.17.11:
version "4.17.21"
resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee"
integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==
lodash.clonedeep@^4.5.0: lodash.clonedeep@^4.5.0:
version "4.5.0" version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef"
@@ -5707,7 +5832,7 @@ lodash.uniq@^4.5.0:
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=
lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.21, lodash@^4.17.5: lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.5:
version "4.17.21" version "4.17.21"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
@@ -6686,6 +6811,11 @@ please-upgrade-node@^3.2.0:
dependencies: dependencies:
semver-compare "^1.0.0" semver-compare "^1.0.0"
pngjs@^3.3.0:
version "3.4.0"
resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-3.4.0.tgz#99ca7d725965fb655814eaf65f38f12bbdbf555f"
integrity sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w==
pnp-webpack-plugin@^1.6.4: pnp-webpack-plugin@^1.6.4:
version "1.7.0" version "1.7.0"
resolved "https://registry.yarnpkg.com/pnp-webpack-plugin/-/pnp-webpack-plugin-1.7.0.tgz#65741384f6d8056f36e2255a8d67ffc20866f5c9" resolved "https://registry.yarnpkg.com/pnp-webpack-plugin/-/pnp-webpack-plugin-1.7.0.tgz#65741384f6d8056f36e2255a8d67ffc20866f5c9"
@@ -6693,6 +6823,11 @@ pnp-webpack-plugin@^1.6.4:
dependencies: dependencies:
ts-pnp "^1.1.6" ts-pnp "^1.1.6"
polycrc@^1.0.1:
version "1.1.0"
resolved "https://registry.yarnpkg.com/polycrc/-/polycrc-1.1.0.tgz#7ee75bd0b47d377d26d78ee7f5c529dde0c77af0"
integrity sha512-rEOTU2hpsys8CwOre1XptjEm1pGA8F2mCLI0Hxb1lc7HweXi0m9K70FX5uiGB63v1kklyZ0UfbWNo7pOXp/BHg==
portfinder@^1.0.26: portfinder@^1.0.26:
version "1.0.28" version "1.0.28"
resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.28.tgz#67c4622852bd5374dd1dd900f779f53462fac778" resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.28.tgz#67c4622852bd5374dd1dd900f779f53462fac778"
@@ -7423,6 +7558,16 @@ prettier@^2.3.2:
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.2.tgz#ef280a05ec253712e486233db5c6f23441e7342d" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.2.tgz#ef280a05ec253712e486233db5c6f23441e7342d"
integrity sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ== integrity sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ==
pretty-format@^26.0.0, pretty-format@^26.6.2:
version "26.6.2"
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.6.2.tgz#e35c2705f14cb7fe2fe94fa078345b444120fc93"
integrity sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==
dependencies:
"@jest/types" "^26.6.2"
ansi-regex "^5.0.0"
ansi-styles "^4.0.0"
react-is "^17.0.1"
pretty-hrtime@^1.0.3: pretty-hrtime@^1.0.3:
version "1.0.3" version "1.0.3"
resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1" resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1"
@@ -7464,6 +7609,11 @@ prop-types@^15.6.2, prop-types@^15.7.2:
object-assign "^4.1.1" object-assign "^4.1.1"
react-is "^16.8.1" react-is "^16.8.1"
property-expr@^2.0.4:
version "2.0.4"
resolved "https://registry.yarnpkg.com/property-expr/-/property-expr-2.0.4.tgz#37b925478e58965031bb612ec5b3260f8241e910"
integrity sha512-sFPkHQjVKheDNnPvotjQmm3KD3uk1fWKUN7CrpdbwmUx3CrG3QiM8QpTSimvig5vTXmTvjz7+TDvXOI9+4rkcg==
proxy-addr@~2.0.5: proxy-addr@~2.0.5:
version "2.0.7" version "2.0.7"
resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025"
@@ -7544,6 +7694,29 @@ q@^1.1.2:
resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7"
integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=
qrcode-pix@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/qrcode-pix/-/qrcode-pix-3.0.3.tgz#2cc050f42ce216fad0092d8d82c95b0e8a51ff1d"
integrity sha512-/4j4ibP0PLmhvJRJTPUv6RSNn6iJ3CmVke1i59v8gbiB1N7V0ZJZ0tgZoGMeQ85H9X0I8hzaQhtet0KX0YMANg==
dependencies:
"@types/jest" "^26.0.15"
polycrc "^1.0.1"
qrcode "^1.4.4"
yup "^0.30.0"
qrcode@^1.4.4:
version "1.4.4"
resolved "https://registry.yarnpkg.com/qrcode/-/qrcode-1.4.4.tgz#f0c43568a7e7510a55efc3b88d9602f71963ea83"
integrity sha512-oLzEC5+NKFou9P0bMj5+v6Z40evexeE29Z9cummZXZ9QXyMr3lphkURzxjXgPJC5azpxcshoDWV1xE46z+/c3Q==
dependencies:
buffer "^5.4.3"
buffer-alloc "^1.2.0"
buffer-from "^1.1.1"
dijkstrajs "^1.0.1"
isarray "^2.0.1"
pngjs "^3.3.0"
yargs "^13.2.4"
qs@6.7.0: qs@6.7.0:
version "6.7.0" version "6.7.0"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc"
@@ -7631,6 +7804,11 @@ react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.1:
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==
react-is@^17.0.1:
version "17.0.2"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0"
integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==
react-relay@^11.0.2: react-relay@^11.0.2:
version "11.0.2" version "11.0.2"
resolved "https://registry.yarnpkg.com/react-relay/-/react-relay-11.0.2.tgz#5f77e30e0d592f19c641e5dcc42f5d828bd16da5" resolved "https://registry.yarnpkg.com/react-relay/-/react-relay-11.0.2.tgz#5f77e30e0d592f19c641e5dcc42f5d828bd16da5"
@@ -8914,11 +9092,21 @@ to-regex@^3.0.1, to-regex@^3.0.2:
regex-not "^1.0.2" regex-not "^1.0.2"
safe-regex "^1.1.0" safe-regex "^1.1.0"
toggle-selection@^1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/toggle-selection/-/toggle-selection-1.0.6.tgz#6e45b1263f2017fa0acc7d89d78b15b8bf77da32"
integrity sha1-bkWxJj8gF/oKzH2J14sVuL932jI=
toidentifier@1.0.0: toidentifier@1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553"
integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==
toposort@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/toposort/-/toposort-2.0.2.tgz#ae21768175d1559d48bef35420b2f4962f09c330"
integrity sha1-riF2gXXRVZ1IvvNUILL0li8JwzA=
ts-pnp@^1.1.6: ts-pnp@^1.1.6:
version "1.2.0" version "1.2.0"
resolved "https://registry.yarnpkg.com/ts-pnp/-/ts-pnp-1.2.0.tgz#a500ad084b0798f1c3071af391e65912c86bca92" resolved "https://registry.yarnpkg.com/ts-pnp/-/ts-pnp-1.2.0.tgz#a500ad084b0798f1c3071af391e65912c86bca92"
@@ -9487,7 +9675,7 @@ yargs-parser@^18.1.2:
camelcase "^5.0.0" camelcase "^5.0.0"
decamelize "^1.2.0" decamelize "^1.2.0"
yargs@^13.3.2: yargs@^13.2.4, yargs@^13.3.2:
version "13.3.2" version "13.3.2"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd"
integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==
@@ -9524,3 +9712,14 @@ yocto-queue@^0.1.0:
version "0.1.0" version "0.1.0"
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
yup@^0.30.0:
version "0.30.0"
resolved "https://registry.yarnpkg.com/yup/-/yup-0.30.0.tgz#427ee076abb1d7e01e747fb782801f7df252fb76"
integrity sha512-GX3vqpC9E+Ow0fmQPgqbEg7UV40XRrN1IOEgKF5v04v6T4ha2vBas/hu0thWgewk8L4wUEBLRO/EnXwYyP+p+A==
dependencies:
"@babel/runtime" "^7.10.5"
lodash "^4.17.20"
lodash-es "^4.17.11"
property-expr "^2.0.4"
toposort "^2.0.2"