diff --git a/.github/ISSUE_TEMPLATE/release b/.github/ISSUE_TEMPLATE/release.md similarity index 100% rename from .github/ISSUE_TEMPLATE/release rename to .github/ISSUE_TEMPLATE/release.md diff --git a/apps/static/src/assets/mainnet-tranches.json b/apps/static/src/assets/mainnet-tranches.json index bf7ae9aaa..0fb260aa9 100644 --- a/apps/static/src/assets/mainnet-tranches.json +++ b/apps/static/src/assets/mainnet-tranches.json @@ -529,8 +529,8 @@ "tranche_start": "2023-03-06T00:00:00.000Z", "tranche_end": "2023-04-06T00:00:00.000Z", "total_added": "14099", - "total_removed": "143.78419653368", - "locked_amount": "4317.28708968040564483", + "total_removed": "165.10784124668", + "locked_amount": "3976.8402464157702101", "deposits": [ { "amount": "30", @@ -1299,6 +1299,11 @@ "user": "0x47e6217C1667e2B1fD177Ab8fD89037bCEC7dc6C", "tx": "0xc68a9a71f6a8a296e8c90bc748307ce197c444e3ca18129a189b7b462a60eceb" }, + { + "amount": "21.323644713", + "user": "0x6A228Fffda4D1B3C773b9ce38DA43592581b36FC", + "tx": "0x5a8d0a823b77eb011079663279e0f2eaf0bd8773114dd6d5bfe65c2ab47680e6" + }, { "amount": "14.85013776876", "user": "0x6F32AA5A6198329c16e438512F992a0548C856f9", @@ -1726,10 +1731,17 @@ "tx": "0x20d505a766d3d8e376509ed8003a5b9f35fd0524f0979a5a57c7d3714d01d3e5" } ], - "withdrawals": [], + "withdrawals": [ + { + "amount": "21.323644713", + "user": "0x6A228Fffda4D1B3C773b9ce38DA43592581b36FC", + "tranche_id": 53, + "tx": "0x5a8d0a823b77eb011079663279e0f2eaf0bd8773114dd6d5bfe65c2ab47680e6" + } + ], "total_tokens": "30", - "withdrawn_tokens": "0", - "remaining_tokens": "30" + "withdrawn_tokens": "21.323644713", + "remaining_tokens": "8.676355287" }, { "address": "0x259fBDdeE4e686242AAdFC7fc856947DF15Acc59", @@ -3306,7 +3318,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "86666.297", "total_removed": "0", - "locked_amount": "59952.3205941027057561402", + "locked_amount": "59774.5826831921568807902", "deposits": [ { "amount": "86666.297", @@ -3372,7 +3384,7 @@ "tranche_end": "2023-06-01T00:00:00.000Z", "total_added": "2500", "total_removed": "0", - "locked_amount": "899.62336563899075", + "locked_amount": "889.341040903541", "deposits": [ { "amount": "2500", @@ -3493,7 +3505,7 @@ "tranche_end": "2023-09-01T00:00:00.000Z", "total_added": "17500", "total_removed": "0", - "locked_amount": "14978.9139555656195", + "locked_amount": "14907.72003321256075", "deposits": [ { "amount": "12500", @@ -3760,7 +3772,7 @@ "tranche_end": "2023-08-01T00:00:00.000Z", "total_added": "37500", "total_removed": "4492.78075095", - "locked_amount": "26207.02645411294875", + "locked_amount": "26051.93945672191875", "deposits": [ { "amount": "7500", @@ -4036,7 +4048,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "129999.45", "total_removed": "0", - "locked_amount": "59897.62164505080734094", + "locked_amount": "59720.045897620131215745", "deposits": [ { "amount": "129999.45", @@ -4102,7 +4114,7 @@ "tranche_end": "2023-09-03T00:00:00.000Z", "total_added": "62600", "total_removed": "0", - "locked_amount": "27354.070059614405762", + "locked_amount": "27225.6880517503839", "deposits": [ { "amount": "10000", @@ -4295,7 +4307,7 @@ "tranche_end": "2023-09-17T00:00:00.000Z", "total_added": "5000", "total_removed": "0", - "locked_amount": "2376.6106988838155", + "locked_amount": "2366.3565449010655", "deposits": [ { "amount": "5000", @@ -4506,7 +4518,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "97499.58", "total_removed": "0", - "locked_amount": "1976.1887408628310248306", + "locked_amount": "1802.0034745624520381388", "deposits": [ { "amount": "97499.58", @@ -4539,7 +4551,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "135173.4239508", "total_removed": "98230.390980249184455396", - "locked_amount": "2701.108834006406820430108332", + "locked_amount": "2463.02764680547440521918478", "deposits": [ { "amount": "135173.4239508", @@ -4585,7 +4597,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "32499.86", "total_removed": "0", - "locked_amount": "831.348476326834519302", + "locked_amount": "758.071742812918929549", "deposits": [ { "amount": "32499.86", @@ -4618,7 +4630,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "10833.29", "total_removed": "0", - "locked_amount": "270.59586182972489332628", + "locked_amount": "246.74499613153580312694", "deposits": [ { "amount": "10833.29", @@ -4651,7 +4663,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "22749.93", "total_removed": "4720.860935375", - "locked_amount": "1011.5477680137440929101", + "locked_amount": "922.3879050392660190243", "deposits": [ { "amount": "6500", @@ -4803,7 +4815,7 @@ "tranche_end": "2023-05-01T00:00:00.000Z", "total_added": "22500", "total_removed": "6029.8222644", - "locked_amount": "4287.751784069981625", + "locked_amount": "4194.6995856353598", "deposits": [ { "amount": "7500", @@ -5199,7 +5211,7 @@ "tranche_end": "2023-06-02T00:00:00.000Z", "total_added": "1939928.38", "total_removed": "928642.9598472029154", - "locked_amount": "353399.575280201010750956", + "locked_amount": "349421.110415395659661956", "deposits": [ { "amount": "1852091.69", @@ -38890,7 +38902,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "3732368.4671", "total_removed": "700133.348465855088393", - "locked_amount": "567553.33674442327201243239", + "locked_amount": "561439.915928280605117991635", "deposits": [ { "amount": "1998.95815", @@ -40272,7 +40284,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "15870102.715470999700000001", "total_removed": "811190.94573738377022952", - "locked_amount": "7312195.27732943035628880483248801894971615", + "locked_amount": "7290517.4796345213779551863295136820032441", "deposits": [ { "amount": "16249.93", @@ -46498,7 +46510,7 @@ "tranche_end": "2023-05-05T00:00:00.000Z", "total_added": "14597706.0446472999", "total_removed": "5781272.031584311406488996", - "locked_amount": "1029126.764932550789662065977913855", + "locked_amount": "1009113.9605146561080773460084744", "deposits": [ { "amount": "129284.449", @@ -53930,7 +53942,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "5778205.3912159303", "total_removed": "3381706.364737906998719578", - "locked_amount": "89710.8053915257113869983245366295", + "locked_amount": "81803.625329582209588089973970046", "deposits": [ { "amount": "552496.6455", @@ -56057,8 +56069,8 @@ "tranche_start": "2022-06-05T00:00:00.000Z", "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "472355.6199999996", - "total_removed": "38818.1373783577949", - "locked_amount": "89932.07048033860228826051293758", + "total_removed": "38870.3290450237949", + "locked_amount": "88963.364006217603675732547640772", "deposits": [ { "amount": "3000", @@ -62687,6 +62699,11 @@ "user": "0xF5037DDA4A660d67560200f45380FF8364e35540", "tx": "0xffc827a0984694ac0243552d0fa4267513471426f6ec34596fd57cfd9d9390e7" }, + { + "amount": "52.191666666", + "user": "0xdc040917f80aC350460e55467e4B6c52Fc5e220E", + "tx": "0xd1ded90c18e54cae27c885ec52af8db6260e3eebfd23eb61092de4ad4d20c301" + }, { "amount": "154.812094114", "user": "0x27e2254A2A8c9c9D1321E5Fe64cAD88e7A4f0ba7", @@ -83934,6 +83951,12 @@ } ], "withdrawals": [ + { + "amount": "52.191666666", + "user": "0xdc040917f80aC350460e55467e4B6c52Fc5e220E", + "tranche_id": 5, + "tx": "0xd1ded90c18e54cae27c885ec52af8db6260e3eebfd23eb61092de4ad4d20c301" + }, { "amount": "20.281506849", "user": "0xdc040917f80aC350460e55467e4B6c52Fc5e220E", @@ -83960,8 +83983,8 @@ } ], "total_tokens": "300", - "withdrawn_tokens": "190.705698249", - "remaining_tokens": "109.294301751" + "withdrawn_tokens": "242.897364915", + "remaining_tokens": "57.102635085" }, { "address": "0x8D01053B4f4857Ff453CAeDBf8387Cd57a5a2A2b", diff --git a/libs/deal-ticket/src/components/deal-ticket/deal-ticket.tsx b/libs/deal-ticket/src/components/deal-ticket/deal-ticket.tsx index 3873bfde3..8b6779123 100644 --- a/libs/deal-ticket/src/components/deal-ticket/deal-ticket.tsx +++ b/libs/deal-ticket/src/components/deal-ticket/deal-ticket.tsx @@ -1,6 +1,6 @@ import { t } from '@vegaprotocol/i18n'; import * as Schema from '@vegaprotocol/types'; -import { memo, useCallback, useEffect, useState } from 'react'; +import { memo, useCallback, useEffect, useState, useRef } from 'react'; import { Controller } from 'react-hook-form'; import { DealTicketAmount } from './deal-ticket-amount'; import { DealTicketButton } from './deal-ticket-button'; @@ -75,6 +75,8 @@ export const DealTicket = ({ handleSubmit, } = useOrderForm(market.id); + const lastSubmitTime = useRef(0); + const asset = market.tradableInstrument.instrument.product.settlementAsset; const { accountBalance: marginAccountBalance } = useMarketAccountBalance( @@ -146,6 +148,10 @@ export const DealTicket = ({ const onSubmit = useCallback( (order: OrderSubmission) => { + const now = new Date().getTime(); + if (lastSubmitTime.current && now - lastSubmitTime.current < 1000) { + return; + } submit( normalizeOrderSubmission( order, @@ -153,6 +159,7 @@ export const DealTicket = ({ market.positionDecimalPlaces ) ); + lastSubmitTime.current = now; }, [submit, market.decimalPlaces, market.positionDecimalPlaces] );