diff --git a/apps/dcellar-web-ui/src/components/RenewalNotification/index.tsx b/apps/dcellar-web-ui/src/components/RenewalNotification/index.tsx index e75b2af3..ec4ae51e 100644 --- a/apps/dcellar-web-ui/src/components/RenewalNotification/index.tsx +++ b/apps/dcellar-web-ui/src/components/RenewalNotification/index.tsx @@ -66,7 +66,6 @@ export const RenewalNotification = ({ address }: RenewalNotificationProps) => { for (const _account of accounts) { const item = accountInfos[_account]; - // item.id === '' means the account is not belong to loginAccount if (!item || closeRenewalAddresses.includes(item.address)) { continue; } diff --git a/apps/dcellar-web-ui/src/components/common/DiscontinueBanner/index.tsx b/apps/dcellar-web-ui/src/components/common/DiscontinueBanner/index.tsx index 6f4d95ef..7c3c02bf 100644 --- a/apps/dcellar-web-ui/src/components/common/DiscontinueBanner/index.tsx +++ b/apps/dcellar-web-ui/src/components/common/DiscontinueBanner/index.tsx @@ -27,7 +27,7 @@ export const DiscontinueBanner = ({ background={bg} color={color} p={'8px 12px'} - gap={8} + gap={'4px'} > {icon} diff --git a/apps/dcellar-web-ui/src/components/layout/index.tsx b/apps/dcellar-web-ui/src/components/layout/index.tsx index 771f3e79..1ed1c260 100644 --- a/apps/dcellar-web-ui/src/components/layout/index.tsx +++ b/apps/dcellar-web-ui/src/components/layout/index.tsx @@ -100,7 +100,7 @@ export const Layout = memo(function Layout({ children }) { const Notification = styled(Flex)` color: #ca300e; font-size: 14px; - gap: 8px; + gap: 4px; border-radius: 4px; background-color: rgba(238, 57, 17, 0.1); padding: 8px 12px; diff --git a/apps/dcellar-web-ui/src/store/slices/accounts.ts b/apps/dcellar-web-ui/src/store/slices/accounts.ts index 148628a0..ec41c500 100644 --- a/apps/dcellar-web-ui/src/store/slices/accounts.ts +++ b/apps/dcellar-web-ui/src/store/slices/accounts.ts @@ -280,71 +280,11 @@ export const setupPaymentAccounts = const [data, error] = await getPaymentAccountsByOwner(loginAccount); const { seedString } = await dispatch(getSpOffChainData(loginAccount, specifiedSp)); - // const testAccounts = [ - // //frozen owner account - // '0x6A69FAA1BD7D73D25A6A3EE1AE41A899DD8CCB8C', - // '0xCDB16F541E1445150F9211DD564668EB01B26E75', - // '0x40EDE296E01E1D57B25697B07D0F1C69077843D0', - // '0xCEE3823C39FCC9845D7C7144A836562F37995085', - // '0x1C893441AB6C1A75E01887087EA508BE8E07AAAE', - // // settime less than 7 days - // '0x367A4BD1606E97647F60DD15FECDCE4535B688F6', - // '0xB4ADFF34EF2C22A4B2FCAA7B955B9FB7BE414E6D', - // '0x78CFE6BCA29CEA13A6C3744D8B6AE86FB576940C', - // '0x9AEAC93ED1444D9E82E2C15F0FD42B0D791A3156', - // '0x3C1A11C54142C44E71A8302AD93AD0191FF17981', - // // // payment accounts - // // '0x4528E40060A22F347EA3BC7EDE62CEA29B5DD837', - // // '0x1745DEB31E405C4CB2C6747E2CFCECA6E57FF77A', - // // '0x258FC67F494A7F25692D02D918E99FA9B29FAEF3', - // // '0x48054722312D664E4C0ADE7FC0C5BD56701BA7D4', - // // '0xF00213234839FE91567E4FFE696A05A078CCF215', - // // '0xFFE7F0C98BB452CD4FA56E9FBE869E502E7186D4', - // // '0x08A8AF3666B39B35C429D8EBA2099B84B999160F', - // // '0xE9AB711EDBBCA0605D7E78E92B14C9D95A0E9D9F', - // // '0xC8B680FB0D2E5B4BEF28195D0D1EE070E271CD84' - // ]; const [paDetail, paError] = await listUserPaymentAccounts( { account: loginAccount }, { type: 'EDDSA', address: loginAccount, domain: window.location.origin, seed: seedString }, { endpoint: spRecords[specifiedSp].endpoint }, ); - // const customDetail = await Promise.all(testAccounts.map(async (address) => { - // const [res, err] = await getStreamRecord(address); - // const [res2, err2] = await getAccount(address); - // console.log('stream_record', res?.streamRecord); - // console.log('account', res2); - // const StreamRecord = {}; - // // const mapObj = { - // // account: 'Account', - // // bufferBalance: 'BufferBalance', - // // crudtimestamp: 'CrudTimestamp', - // // frozennetflowrate: 'FrozenNetflowRate', - // // lockbalance: 'LockBalance', - // // netflowrate: 'NetflowRate', - // // outflowcount: 'OutflowCount', - // // settletimestamp: 'SettleTimestamp', - // // staticbalance: 'StaticBalance', - // // status: 'Status', - // // } - // const capitalizeFirstLetter = (str) => { - // return str.charAt(0).toUpperCase() + str.slice(1); - // } - // Object.entries(res?.streamRecord || {}).map(([key, value]) => { - // StreamRecord[capitalizeFirstLetter(key)] = value.low ? value.low : value; - // }); - // const PaymentAccount = {}; - // Object.entries(res2 || {}).map(([key, value]) => { - // PaymentAccount[capitalizeFirstLetter(key)] = value - // }); - // return { - // StreamRecord, - // PaymentAccount - // } - // } - // )) - // console.log('customDetail', customDetail); - // console.log('paDetail', paDetail); if (error || paError || paDetail?.code !== 0) { dispatch(setPaymentAccountsLoading(false)); dispatch(setPaymentAccountList({ loginAccount, paymentAccounts: [] })); @@ -363,13 +303,6 @@ export const setupPaymentAccounts = paDetail?.body?.GfSpListUserPaymentAccountsResponse.PaymentAccounts, (item) => item.PaymentAccount.Address, ); - // const keyCustomDetail = keyBy( - // customDetail, - // (item) => item.StreamRecord.Account?.toLowerCase(), - // ); - - console.log('keyAccountDetail', keyAccountDetail); - // console.log('keyCustomDetail', keyCustomDetail); let totalPaymentAccountNetflowRate = BN(0); const newPaymentAccounts = data.paymentAccounts.map((address, index) => { const detail = keyAccountDetail[address]; diff --git a/apps/dcellar-web-ui/src/store/slices/global.ts b/apps/dcellar-web-ui/src/store/slices/global.ts index c6287c11..2526221a 100644 --- a/apps/dcellar-web-ui/src/store/slices/global.ts +++ b/apps/dcellar-web-ui/src/store/slices/global.ts @@ -123,7 +123,6 @@ export interface GlobalState { walletDisconnected: boolean; walletConnected: boolean; signatureAction: SignatureAction | object; - closeRenewalAddresses: string[]; } const defaultStoreFeeParams: StoreFeeParams = { @@ -155,7 +154,6 @@ const initialState: GlobalState = { walletDisconnected: false, walletConnected: false, signatureAction: {}, - closeRenewalAddresses: [], }; export const globalSlice = createSlice({ @@ -445,9 +443,6 @@ export const globalSlice = createSlice({ (task: UploadObject) => !ids.includes(task.id), ); }, - setCloseRenewalAddresses(state, { payload }: PayloadAction) { - state.closeRenewalAddresses = payload; - }, }, }); @@ -474,7 +469,6 @@ export const { setSignatureAction, setWaitQueue, clearUploadRecords, - setCloseRenewalAddresses, } = globalSlice.actions; const _emptyUploadQueue = Array();