Skip to content

Commit

Permalink
fix(dcellar-web-ui): change the api to get bnb price and several styl…
Browse files Browse the repository at this point in the history
…es (#402)

* feat(dcellar-web-ui): change bnb price service

* feat(dcellar-web-ui): update csp

* fix(dcellar-web-ui): fix loading position & bsc icon

* docs(dcellar-web-ui): update changelog
  • Loading branch information
devinxl authored Dec 3, 2024
1 parent d11cca1 commit d8d818d
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 7 deletions.
12 changes: 12 additions & 0 deletions apps/dcellar-web-ui/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
{
"name": "dcellar-web-ui",
"entries": [
{
"version": "1.9.1",
"tag": "dcellar-web-ui_v1.9.1",
"date": "Tue, 03 Dec 2024 06:37:27 GMT",
"comments": {
"patch": [
{
"comment": "Change get bnb price api & several styles"
}
]
}
},
{
"version": "1.9.0",
"tag": "dcellar-web-ui_v1.9.0",
Expand Down
9 changes: 8 additions & 1 deletion apps/dcellar-web-ui/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Change Log - dcellar-web-ui

This log was last generated on Tue, 05 Nov 2024 07:18:43 GMT and should not be manually modified.
This log was last generated on Tue, 03 Dec 2024 06:37:27 GMT and should not be manually modified.

## 1.9.1
Tue, 03 Dec 2024 06:37:27 GMT

### Patches

- Change get bnb price api & several styles

## 1.9.0
Tue, 05 Nov 2024 07:18:43 GMT
Expand Down
2 changes: 1 addition & 1 deletion apps/dcellar-web-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dcellar-web-ui",
"version": "1.9.0",
"version": "1.9.1",
"private": false,
"scripts": {
"dev": "node ./scripts/dev.js -p 3200",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ const Container = styled.div<{ rowCursor: string }>`
}
.ant-spin-nested-loading > div > .ant-spin {
max-height: max-content;
max-height: 400px;
}
.ant-table-ping-left:not(.ant-table-has-fix-left) .ant-table-container::before {
Expand Down
4 changes: 2 additions & 2 deletions apps/dcellar-web-ui/src/facade/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ export const getObjectInfoAndBucketQuota = async ({

export const getBnbUsdtExchangeRate = async (): Promise<string> => {
const [res, error] = await get({
url: 'https://api.binance.com/api/v3/ticker/price?symbol=BNBUSDT',
url: 'https://bsc-explorer-api.nodereal.io/api/token/getPrice?symbol=bnb',
customOptions: { needNotify: false },
}).then(resolve, commonFault);

if (error) return BNB_USDT_EXCHANGE_RATE;
return res.price;
return res.data;
};

export const getGasFees = async (network?: 'mainnet') => {
Expand Down
2 changes: 1 addition & 1 deletion apps/dcellar-web-ui/src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function middleware(request: NextRequest) {
base-uri 'self';
form-action 'self';
frame-ancestors 'none';
frame-src 'self' https://*.walletconnect.com https://verify.walletconnect.com;
frame-src 'self' https://*.walletconnect.com https://verify.walletconnect.com https://verify.walletconnect.org;
media-src 'self';
manifest-src 'self';
worker-src 'self' blob:;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ export const Amount = ({
/>

<InputRightElement width={'80px'} zIndex="0">
<IconFont type={'bnb'} color="#F0B90B" w={24} />
<IconFont type={'line-bsc'} color="#F0B90B" w={24} />
<Text fontSize={'14px'} fontWeight="600" ml="4px" mr={'12px'}>
{displayTokenSymbol()}
</Text>
Expand Down

0 comments on commit d8d818d

Please sign in to comment.