Compare commits

..
Author SHA1 Message Date
Matthew Russell b97f36a5a9 fix(trading): correct link for get started prompt 2023-09-14 13:59:38 -07:00
10 changed files with 5 additions and 168 deletions
+1 -15
View File
@@ -113,20 +113,6 @@ In order to run a container on port 3000:
docker run -p 3000:80 [TAG]
```
On top of that there are two possible scenarios for running docker image - using nginx server (default) of ipfs daemon.
to run ipfs on port 3000:
```bash
docker run -p 3000:80 [TAG] ipfs
```
to run nginx on port 3000:
```bash
docker run -p 3000:80 [TAG]
```
## Build instructions
The [`docker`](./docker) subfolder has some docker configurations for easily setting up your own hosted version of Console either for the web, or ready for pinning on IPFS.
@@ -164,7 +150,7 @@ As a prerequisite you need to perform build of `dist` directory and move its con
You can build any of the containers locally with the following command:
```bash
docker build -f docker/node-outside-docker.Dockerfile . --tag=[TAG]
docker build --dockerfile docker/node-outside-docker.Dockerfile . --tag=[TAG]
```
### Verifying ipfs-hash of existing current application version
@@ -1,24 +0,0 @@
{
"transaction": {
"block": "10277448",
"index": 13,
"hash": "C79AE0040AE7CFE3EACD715E569B043B214D8451405CB40C06EAA1C38F453A85",
"submitter": "86ff2c3b45be7c43202d1dc370779d070faaba1029094c46174857f1b445673f",
"type": "Cancel Order",
"code": 0,
"cursor": "10277448.13",
"command": {
"nonce": "18292162483463539777",
"blockHeight": "10277444",
"orderCancellation": {
"orderId": "",
"marketId": ""
}
},
"signature": {
"value": "22a24614c3b19b5c6a7a979738dbda5cdeea39f61aabb937fb795f975ddc56a9e4823659024c29f1b9400939a502c4cf7fa10b946400d2b4f18caed6ac9f7d07",
"algo": "vega/ed25519",
"version": 1
}
}
}
@@ -1,30 +0,0 @@
{
"transaction": {
"block": "9319120",
"index": 0,
"hash": "28B2C9082E853F83958E91E9CA12343034CE7268DAF05EB987E6DB236C240208",
"submitter": "a80cc31c783829674a0f340a765e401f089349c706cc6c99401962aa3f663471",
"type": "Amend Order",
"code": 70,
"cursor": "9319120.0",
"command": {
"nonce": "13856472833343542396",
"blockHeight": "9319118",
"orderAmendment": {
"orderId": "a4a385ef2e8d8d508d129c91680fdd771374a21bd6fc49628a7e79cf53af1fbb",
"marketId": "e6561f69c2a76858866aab2896eeb529b46040614566e0665602d67bc682c31f",
"price": "13984",
"sizeDelta": "0",
"timeInForce": "TIME_IN_FORCE_GTC",
"peggedOffset": "",
"peggedReference": "PEGGED_REFERENCE_UNSPECIFIED"
}
},
"signature": {
"value": "43d6f047c7c11f96b15ccd18acaf2889ec902bcdc816b029ddd103576e303abca71e4ef06c41e9072f7623230586d7d85425784f935857c3838f1b9828be1a01",
"algo": "vega/ed25519",
"version": 1
},
"error": "couldn't insert order in book"
}
}
@@ -1,64 +0,0 @@
context('Transaction ID page', { tags: '@smoke' }, function () {
describe('Verify elements on transaction page', function () {
it.only('Able to view order cancelation', function () {
const txId =
'C79AE0040AE7CFE3EACD715E569B043B214D8451405CB40C06EAA1C38F453A85';
cy.intercept('GET', `/rest/transactions/${txId}`, {
fixture: '/mocks/cancel_order_transaction.json',
});
cy.visit(`/txs/${txId}`);
cy.validate_transaction_fields(0, 'Type', 'Cancel Order');
cy.validate_transaction_fields(
1,
'Hash',
'c79ae0040ae7cfe3eacd715e569b043b214d8451405cb40c06eaa1c38f453a85'
);
cy.validate_transaction_fields(
2,
'Submitter',
'86ff2c3b45be7c43202d1dc370779d070faaba1029094c46174857f1b445673f',
'/parties/86ff2c3b45be7c43202d1dc370779d070faaba1029094c46174857f1b445673f'
);
cy.validate_transaction_fields(
3,
'Block',
'10277448',
'/blocks/10277448'
);
cy.validate_transaction_fields(5, 'Response code', 'Success');
cy.contains('Show raw transaction').click();
cy.get('textarea').should(
'have.text',
'{\n "nonce": "18292162483463539777",\n "blockHeight": "10277444",\n "orderCancellation": {\n "orderId": "",\n "marketId": ""\n }\n}'
);
});
it('Able to view order amendment', function () {
const txId =
'0x28B2C9082E853F83958E91E9CA12343034CE7268DAF05EB987E6DB236C240208';
cy.intercept('GET', `/rest/transactions/${txId}`, {
fixture: '/mocks/order_amendment_transaction.json',
});
cy.visit(`/txs/${txId}`);
cy.validate_transaction_fields(0, 'Type', 'Amend Order');
cy.validate_transaction_fields(
4,
'Response code',
"couldn't insert order in book"
);
cy.validate_transaction_fields(
7,
'Order',
'a4a385ef2e8d8d508d129c91680fdd771374a21bd6fc49628a7e79cf53af1fbb'
);
cy.validate_transaction_fields(
8,
'Market',
'ETHBTC Quarterly (Jul 2023)',
'/markets/e6561f69c2a76858866aab2896eeb529b46040614566e0665602d67bc682c31f'
);
});
});
});
@@ -134,16 +134,3 @@ Cypress.Commands.add(
cy.contains(tableRowName).siblings().should('have.text', changeType);
}
);
Cypress.Commands.add(
'validate_transaction_fields',
(rowNum, rowName, rowValue, hrefUrl = null) => {
cy.get('tr')
.eq(rowNum)
.within(() => {
cy.get('td').eq(0).should('have.text', rowName);
cy.get('td').eq(1).should('have.text', rowValue);
if (hrefUrl) cy.get('a').should('have.attr', 'href', hrefUrl);
});
}
);
@@ -73,7 +73,6 @@ export const GetStarted = ({ lead }: Props) => {
const openVegaWalletDialog = useVegaWalletDialogStore(
(store) => store.openVegaWalletDialog
);
const CANONICAL_URL = VEGA_NETWORKS[VEGA_ENV] || 'https://console.vega.xyz';
const currentStep = useGetOnboardingStep();
const dismissed = useOnboardingStore((store) => store.dismissed);
@@ -116,7 +115,7 @@ export const GetStarted = ({ lead }: Props) => {
{VEGA_ENV === Networks.MAINNET && (
<p className="text-sm">
{t('Experiment for free with virtual assets on')}{' '}
<ExternalLink href={CANONICAL_URL}>
<ExternalLink href={VEGA_NETWORKS.TESTNET}>
{t('Fairground Testnet')}
</ExternalLink>
</p>
@@ -124,7 +123,7 @@ export const GetStarted = ({ lead }: Props) => {
{VEGA_ENV === Networks.TESTNET && (
<p className="text-sm">
{t('Ready to trade with real funds?')}{' '}
<ExternalLink href={CANONICAL_URL}>
<ExternalLink href={VEGA_NETWORKS.MAINNET}>
{t('Switch to Mainnet')}
</ExternalLink>
</p>
-11
View File
@@ -1,11 +0,0 @@
#!/bin/sh
daemon="${1:-nginx}"
if [[ "$daemon" = "nginx" ]]; then
nginx -g 'daemon off;'
elif [[ "$daemon" = "ipfs" ]]; then
ipfs config profile apply server
ipfs config --json Addresses.Gateway '"/ip4/127.0.0.1/tcp/80"'
ipfs daemon
fi
-2
View File
@@ -20,8 +20,6 @@ RUN sh docker/docker-build.sh
FROM --platform=amd64 nginx:1.23-alpine@sha256:6318314189b40e73145a48060bff4783a116c34cc7241532d0d94198fb2c9629
# configuration of system
EXPOSE 80
COPY docker/entrypoint.sh /entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ]
# Copy dist
COPY docker/nginx.conf /etc/nginx/conf.d/default.conf
RUN rm -rf /usr/share/nginx/html/*
-2
View File
@@ -1,7 +1,5 @@
FROM --platform=amd64 nginx:1.23-alpine@sha256:6318314189b40e73145a48060bff4783a116c34cc7241532d0d94198fb2c9629
EXPOSE 80
COPY docker/entrypoint.sh /entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ]
COPY docker/nginx.conf /etc/nginx/conf.d/default.conf
RUN rm -rf /usr/share/nginx/html/*
COPY ./dist-result/ /usr/share/nginx/html/
+2 -4
View File
@@ -368,7 +368,7 @@ export const PositionsTable = ({
DocsLinks?.LOSS_SOCIALIZATION ?? '';
if (!args.data) {
return null;
return <>-</>;
}
const losses = parseInt(
@@ -377,9 +377,7 @@ export const PositionsTable = ({
if (losses <= 0) {
// eslint-disable-next-line react/jsx-no-useless-fragment
return (
<TooltipCellComponent {...args} value={args.valueFormatted} />
);
return <>{args.valueFormatted}</>;
}
const lossesFormatted = addDecimalsFormatNumber(