Merge branch 'staging' into dev
This commit is contained in:
commit
3f126c312f
15 changed files with 101 additions and 193 deletions
|
|
@ -7,6 +7,7 @@
|
|||
"airbnb-base",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"next/core-web-vitals",
|
||||
"plugin:prettier/recommended",
|
||||
"prettier"
|
||||
],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
|
|
|
|||
|
|
@ -1,15 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
/** @type {import('sequelize-cli').Migration} */
|
||||
module.exports = {
|
||||
async up(queryInterface, Sequelize) {
|
||||
queryInterface.addColumn('Currencies', 'asset_info', {
|
||||
type: Sequelize.JSONB,
|
||||
allowNull: true,
|
||||
});
|
||||
},
|
||||
|
||||
async down(queryInterface, Sequelize) {
|
||||
queryInterface.removeColumn('Currencies', 'asset_info');
|
||||
},
|
||||
};
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
async function updateColumnType(queryInterface, table, column, type, transaction) {
|
||||
await queryInterface.changeColumn(
|
||||
table,
|
||||
column,
|
||||
{
|
||||
type: `${type} USING CAST("${column}" as ${type})`,
|
||||
},
|
||||
{ transaction },
|
||||
);
|
||||
}
|
||||
|
||||
/** @type {import('sequelize-cli').Migration} */
|
||||
module.exports = {
|
||||
async up(queryInterface, Sequelize) {
|
||||
await queryInterface.sequelize.transaction(async (transaction) => {
|
||||
await updateColumnType(queryInterface, 'Orders', 'price', 'VARCHAR', transaction);
|
||||
await updateColumnType(queryInterface, 'Orders', 'amount', 'VARCHAR', transaction);
|
||||
await updateColumnType(queryInterface, 'Orders', 'total', 'VARCHAR', transaction);
|
||||
await updateColumnType(queryInterface, 'Orders', 'left', 'VARCHAR', transaction);
|
||||
|
||||
await updateColumnType(
|
||||
queryInterface,
|
||||
'Transactions',
|
||||
'amount',
|
||||
'VARCHAR',
|
||||
transaction,
|
||||
);
|
||||
});
|
||||
},
|
||||
|
||||
async down(queryInterface, Sequelize) {
|
||||
queryInterface.sequelize.transaction(async (transaction) => {
|
||||
await updateColumnType(
|
||||
queryInterface,
|
||||
'Orders',
|
||||
'price',
|
||||
'DOUBLE PRECISION',
|
||||
transaction,
|
||||
);
|
||||
await updateColumnType(
|
||||
queryInterface,
|
||||
'Orders',
|
||||
'amount',
|
||||
'DOUBLE PRECISION',
|
||||
transaction,
|
||||
);
|
||||
await updateColumnType(
|
||||
queryInterface,
|
||||
'Orders',
|
||||
'total',
|
||||
'DOUBLE PRECISION',
|
||||
transaction,
|
||||
);
|
||||
await updateColumnType(
|
||||
queryInterface,
|
||||
'Orders',
|
||||
'left',
|
||||
'DOUBLE PRECISION',
|
||||
transaction,
|
||||
);
|
||||
|
||||
await updateColumnType(
|
||||
queryInterface,
|
||||
'Transactions',
|
||||
'amount',
|
||||
'DOUBLE PRECISION',
|
||||
transaction,
|
||||
);
|
||||
});
|
||||
},
|
||||
};
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
/** @type {import('sequelize-cli').Migration} */
|
||||
module.exports = {
|
||||
async up(queryInterface, Sequelize) {
|
||||
queryInterface.addColumn('Users', 'exchange_notifications_amount', {
|
||||
type: Sequelize.INTEGER,
|
||||
allowNull: false,
|
||||
defaultValue: 0,
|
||||
});
|
||||
},
|
||||
|
||||
async down(queryInterface) {
|
||||
queryInterface.removeColumn('Users', 'exchange_notifications_amount');
|
||||
},
|
||||
};
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
/** @type {import('sequelize-cli').Migration} */
|
||||
module.exports = {
|
||||
async up(queryInterface, Sequelize) {
|
||||
queryInterface.addColumn('Currencies', 'whitelisted', {
|
||||
type: Sequelize.BOOLEAN,
|
||||
defaultValue: false,
|
||||
allowNull: false,
|
||||
});
|
||||
},
|
||||
|
||||
async down(queryInterface, Sequelize) {
|
||||
queryInterface.removeColumn('Currencies', 'whitelisted');
|
||||
},
|
||||
};
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
/** @type {import('sequelize-cli').Migration} */
|
||||
module.exports = {
|
||||
async up(queryInterface, Sequelize) {
|
||||
queryInterface.addColumn('Orders', 'hasNotification', {
|
||||
type: Sequelize.BOOLEAN,
|
||||
defaultValue: false,
|
||||
allowNull: false,
|
||||
});
|
||||
},
|
||||
|
||||
async down(queryInterface, Sequelize) {
|
||||
queryInterface.removeColumn('Users', 'exchange_notifications_amount');
|
||||
},
|
||||
};
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
/** @type {import('sequelize-cli').Migration} */
|
||||
module.exports = {
|
||||
async up(queryInterface, Sequelize) {
|
||||
await queryInterface.addColumn('Users', 'isAdmin', {
|
||||
type: Sequelize.BOOLEAN,
|
||||
allowNull: false,
|
||||
defaultValue: false,
|
||||
});
|
||||
},
|
||||
|
||||
async down(queryInterface, Sequelize) {
|
||||
await queryInterface.removeColumn('Users', 'isAdmin');
|
||||
},
|
||||
};
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
/** @type {import('sequelize-cli').Migration} */
|
||||
module.exports = {
|
||||
up: async (queryInterface, Sequelize) => {
|
||||
await queryInterface.addColumn('Pairs', 'featured', {
|
||||
type: Sequelize.BOOLEAN,
|
||||
defaultValue: false,
|
||||
allowNull: false,
|
||||
});
|
||||
},
|
||||
|
||||
down: async (queryInterface, Sequelize) => {
|
||||
await queryInterface.removeColumn('Pairs', 'featured');
|
||||
},
|
||||
};
|
||||
76
package-lock.json
generated
76
package-lock.json
generated
|
|
@ -51,6 +51,7 @@
|
|||
"eslint-config-airbnb-base": "^15.0.0",
|
||||
"eslint-config-prettier": "^10.1.5",
|
||||
"eslint-plugin-import": "^2.31.0",
|
||||
"eslint-plugin-prettier": "^5.5.3",
|
||||
"husky": "^9.1.7",
|
||||
"lint-staged": "^15.5.2",
|
||||
"prettier": "3.5.3",
|
||||
|
|
@ -3442,6 +3443,18 @@
|
|||
"url": "https://opencollective.com/parcel"
|
||||
}
|
||||
},
|
||||
"node_modules/@pkgr/core": {
|
||||
"version": "0.2.9",
|
||||
"resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.2.9.tgz",
|
||||
"integrity": "sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "^12.20.0 || ^14.18.0 || >=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/pkgr"
|
||||
}
|
||||
},
|
||||
"node_modules/@rc-component/async-validator": {
|
||||
"version": "5.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@rc-component/async-validator/-/async-validator-5.0.4.tgz",
|
||||
|
|
@ -7246,6 +7259,36 @@
|
|||
"eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-prettier": {
|
||||
"version": "5.5.3",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.5.3.tgz",
|
||||
"integrity": "sha512-NAdMYww51ehKfDyDhv59/eIItUVzU0Io9H2E8nHNGKEeeqlnci+1gCvrHib6EmZdf6GxF+LCV5K7UC65Ezvw7w==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"prettier-linter-helpers": "^1.0.0",
|
||||
"synckit": "^0.11.7"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^14.18.0 || >=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/eslint-plugin-prettier"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/eslint": ">=8.0.0",
|
||||
"eslint": ">=8.0.0",
|
||||
"eslint-config-prettier": ">= 7.0.0 <10.0.0 || >=10.1.0",
|
||||
"prettier": ">=3.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/eslint": {
|
||||
"optional": true
|
||||
},
|
||||
"eslint-config-prettier": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-react": {
|
||||
"version": "7.37.5",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.5.tgz",
|
||||
|
|
@ -7575,6 +7618,12 @@
|
|||
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/fast-diff": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz",
|
||||
"integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/fast-glob": {
|
||||
"version": "3.3.3",
|
||||
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz",
|
||||
|
|
@ -10418,6 +10467,18 @@
|
|||
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/prettier-linter-helpers": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz",
|
||||
"integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"fast-diff": "^1.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/process": {
|
||||
"version": "0.11.10",
|
||||
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
|
||||
|
|
@ -12704,6 +12765,21 @@
|
|||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/synckit": {
|
||||
"version": "0.11.11",
|
||||
"resolved": "https://registry.npmjs.org/synckit/-/synckit-0.11.11.tgz",
|
||||
"integrity": "sha512-MeQTA1r0litLUf0Rp/iisCaL8761lKAZHaimlbGK4j0HysC4PLfqygQj9srcs0m2RdtDYnF8UuYyKpbjHYp7Jw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@pkgr/core": "^0.2.9"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^14.18.0 || >=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/synckit"
|
||||
}
|
||||
},
|
||||
"node_modules/tapable": {
|
||||
"version": "2.2.2",
|
||||
"resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.2.tgz",
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
"build": "next build",
|
||||
"start": "next start -p 30289",
|
||||
"lint": "next lint",
|
||||
"lint:fix": "eslint . --fix",
|
||||
"eslint": "eslint . --ext .js,.ts,.tsx,.jsx --fix",
|
||||
"format": "prettier --write .",
|
||||
"format:check": "prettier --check .",
|
||||
"prepare": "husky"
|
||||
|
|
@ -63,6 +63,7 @@
|
|||
"eslint-config-airbnb-base": "^15.0.0",
|
||||
"eslint-config-prettier": "^10.1.5",
|
||||
"eslint-plugin-import": "^2.31.0",
|
||||
"eslint-plugin-prettier": "^5.5.3",
|
||||
"husky": "^9.1.7",
|
||||
"lint-staged": "^15.5.2",
|
||||
"prettier": "3.5.3",
|
||||
|
|
|
|||
|
|
@ -97,10 +97,10 @@ function CurrencyDropdown(props: CurrencyDropdownProps) {
|
|||
body={
|
||||
!props.noStars
|
||||
? separateArray(e.data, (curr) =>
|
||||
(state?.user?.favourite_currencies || []).includes(
|
||||
curr.id,
|
||||
),
|
||||
)
|
||||
(state?.user?.favourite_currencies || []).includes(
|
||||
curr.id,
|
||||
),
|
||||
)
|
||||
: e.data
|
||||
}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -475,13 +475,13 @@ function Offers(props) {
|
|||
)}
|
||||
{props.categoryState !== 'finished' &&
|
||||
props.categoryState !== 'active' && (
|
||||
<Button
|
||||
className={rowStyles.row__button__iconed}
|
||||
onClick={removeOffer}
|
||||
>
|
||||
<img src={deleteIcon} alt="delete" />
|
||||
</Button>
|
||||
)}
|
||||
<Button
|
||||
className={rowStyles.row__button__iconed}
|
||||
onClick={removeOffer}
|
||||
>
|
||||
<img src={deleteIcon} alt="delete" />
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
|
|
|||
|
|
@ -62,8 +62,6 @@ App.getInitialProps = async (context: AppContext) => {
|
|||
try {
|
||||
const pageProps = await NextApp.getInitialProps(context);
|
||||
|
||||
if (!context.ctx.req) return pageProps;
|
||||
|
||||
const configRes = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/api/config`, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@ function Home(props: HomeProps) {
|
|||
|
||||
const offersNotifications = state.user?.chats
|
||||
? state.user.chats?.filter(
|
||||
(e) => state.user?.id && !(e.view_list || [])?.includes(state.user?.id),
|
||||
).length || 0
|
||||
(e) => state.user?.id && !(e.view_list || [])?.includes(state.user?.id),
|
||||
).length || 0
|
||||
: 0;
|
||||
|
||||
function Card(props: { title: string; value: string }) {
|
||||
|
|
|
|||
|
|
@ -334,19 +334,19 @@ function ProcessContent() {
|
|||
)}
|
||||
{!finishState &&
|
||||
(myState === 'deposit' || myState === 'canceled') && (
|
||||
<Button onClick={() => changeDepositState('confirmed')}>
|
||||
<Button onClick={() => changeDepositState('confirmed')}>
|
||||
Confirm funds received
|
||||
</Button>
|
||||
)}
|
||||
</Button>
|
||||
)}
|
||||
{!finishState &&
|
||||
(myState === 'deposit' || myState === 'confirmed') && (
|
||||
<Button
|
||||
onClick={() => changeDepositState('canceled')}
|
||||
className={styles.deposit__cancel__btn}
|
||||
>
|
||||
<Button
|
||||
onClick={() => changeDepositState('canceled')}
|
||||
className={styles.deposit__cancel__btn}
|
||||
>
|
||||
Cancel funds and return deposit
|
||||
</Button>
|
||||
)}
|
||||
</Button>
|
||||
)}
|
||||
{finishState === 'confirmed' && (
|
||||
<p style={{ color: '#16D1D6' }}>
|
||||
The offer finished successfully.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue