Skip to content

Commit ff75a6e

Browse files
committed
merge main
2 parents 77ce053 + c98f2bf commit ff75a6e

File tree

12 files changed

+2042
-2452
lines changed

12 files changed

+2042
-2452
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@
3737
"ui:start-with-chopsticks": "yarn workspace multix-ui start-with-chopsticks"
3838
},
3939
"devDependencies": {
40-
"concurrently": "^8.2.2",
40+
"concurrently": "^9.1.0",
4141
"eslint-config-prettier": "^9.1.0",
42-
"eslint-plugin-prettier": "^5.1.3",
43-
"prettier": "^3.2.5"
42+
"eslint-plugin-prettier": "^5.2.1",
43+
"prettier": "^3.3.3"
4444
},
4545
"resolutions": {
4646
"graphql": "^16.0.0",

packages/ui/cypress/tests/setIdentity.cy.ts

Lines changed: 58 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { landingPageNetwork, landingPageUrl } from '../fixtures/landingData'
1+
import { landingPageNetwork } from '../fixtures/landingData'
22
import { setIdentityMultisigs } from '../fixtures/setIdentity/setIdentityMultisigs'
33
import { setIdentitySignatories } from '../fixtures/setIdentity/setIdentitySignatories'
44
import { multisigPage } from '../support/page-objects/multisigPage'
55
import { sendTxModal } from '../support/page-objects/sendTxModal'
66
import { topMenuItems } from '../support/page-objects/topMenuItems'
7-
import { waitForTxRequest } from '../utils/waitForTxRequests'
7+
// import { waitForTxRequest } from '../utils/waitForTxRequests'
88

99
describe('Set an identity', () => {
1010
// joystream network isn't supported any more.
@@ -25,69 +25,69 @@ describe('Set an identity', () => {
2525
sendTxModal.selectionEasySetupSetIdentity().should('not.exist')
2626
})
2727

28-
it.skip('Can set an identity from the options menu', () => {
29-
const multisigSignatoryWithoutIdentity = setIdentitySignatories[1]
30-
cy.setupAndVisit({
31-
url: landingPageUrl,
32-
extensionConnectionAllowed: true,
33-
injectExtensionWithAccounts: [multisigSignatoryWithoutIdentity]
34-
})
35-
multisigPage.optionsMenuButton().click()
36-
multisigPage.setIdentityMenuOption().should('be.visible').click()
37-
sendTxModal.sendTxTitle().should('be.visible')
38-
sendTxModal.setIdentitySection().should('be.visible')
28+
// it.skip('Can set an identity from the options menu', () => {
29+
// const multisigSignatoryWithoutIdentity = setIdentitySignatories[1]
30+
// cy.setupAndVisit({
31+
// url: landingPageUrl,
32+
// extensionConnectionAllowed: true,
33+
// injectExtensionWithAccounts: [multisigSignatoryWithoutIdentity]
34+
// })
35+
// multisigPage.optionsMenuButton().click()
36+
// multisigPage.setIdentityMenuOption().should('be.visible').click()
37+
// sendTxModal.sendTxTitle().should('be.visible')
38+
// sendTxModal.setIdentitySection().should('be.visible')
3939

40-
// every field is empty to start with
41-
sendTxModal.setIdentityFieldInput('display').should('have.value', '')
42-
sendTxModal.setIdentityFieldInput('legal').should('have.value', '')
40+
// // every field is empty to start with
41+
// sendTxModal.setIdentityFieldInput('display').should('have.value', '')
42+
// sendTxModal.setIdentityFieldInput('legal').should('have.value', '')
4343

44-
// typing into legal with empty display should show an error
45-
sendTxModal.setIdentityField('legal').type('le')
46-
sendTxModal.sendTxError().should('contain', 'Display name is required')
47-
sendTxModal.setIdentityFieldElement('display', 'label').should('have.class', 'Mui-error')
48-
sendTxModal.setIdentityFieldElement('display', 'div').should('have.class', 'Mui-error')
49-
sendTxModal.buttonSend().should('be.disabled')
44+
// // typing into legal with empty display should show an error
45+
// sendTxModal.setIdentityField('legal').type('le')
46+
// sendTxModal.sendTxError().should('contain', 'Display name is required')
47+
// sendTxModal.setIdentityFieldElement('display', 'label').should('have.class', 'Mui-error')
48+
// sendTxModal.setIdentityFieldElement('display', 'div').should('have.class', 'Mui-error')
49+
// sendTxModal.buttonSend().should('be.disabled')
5050

51-
// typing into display should remove the error
52-
sendTxModal.setIdentityField('display').type('diis')
53-
sendTxModal.sendTxError().should('not.exist')
54-
sendTxModal.setIdentityFieldElement('display', 'label').should('not.have.class', 'Mui-error')
55-
sendTxModal.buttonSend().should('be.enabled')
51+
// // typing into display should remove the error
52+
// sendTxModal.setIdentityField('display').type('diis')
53+
// sendTxModal.sendTxError().should('not.exist')
54+
// sendTxModal.setIdentityFieldElement('display', 'label').should('not.have.class', 'Mui-error')
55+
// sendTxModal.buttonSend().should('be.enabled')
5656

57-
// typing a too long field should show another error
58-
sendTxModal.setIdentityField('legal').type('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
59-
sendTxModal.sendTxError().should('contain', 'A field exceeds the 32 character limit')
60-
sendTxModal.setIdentityFieldElement('legal', 'label').should('have.class', 'Mui-error')
61-
sendTxModal.buttonSend().should('be.disabled')
57+
// // typing a too long field should show another error
58+
// sendTxModal.setIdentityField('legal').type('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
59+
// sendTxModal.sendTxError().should('contain', 'A field exceeds the 32 character limit')
60+
// sendTxModal.setIdentityFieldElement('legal', 'label').should('have.class', 'Mui-error')
61+
// sendTxModal.buttonSend().should('be.disabled')
6262

63-
// too many bytes should show the From error
64-
sendTxModal.setIdentityField('legal').type('{selectall}{del}aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
65-
sendTxModal.setIdentityFieldElement('legal', 'label').should('not.have.class', 'Mui-error')
66-
sendTxModal.sendTxError().should('contain', `The "From" account doesn't have`)
67-
sendTxModal.buttonSend().should('be.disabled')
63+
// // too many bytes should show the From error
64+
// sendTxModal.setIdentityField('legal').type('{selectall}{del}aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
65+
// sendTxModal.setIdentityFieldElement('legal', 'label').should('not.have.class', 'Mui-error')
66+
// sendTxModal.sendTxError().should('contain', `The "From" account doesn't have`)
67+
// sendTxModal.buttonSend().should('be.disabled')
6868

69-
// removing should remove the error
70-
sendTxModal.setIdentityField('legal').type('{selectall}{del}leeg')
71-
sendTxModal.sendTxError().should('not.exist')
72-
sendTxModal.setIdentityFieldElement('legal', 'label').should('not.have.class', 'Mui-error')
73-
sendTxModal.buttonSend().should('be.enabled')
69+
// // removing should remove the error
70+
// sendTxModal.setIdentityField('legal').type('{selectall}{del}leeg')
71+
// sendTxModal.sendTxError().should('not.exist')
72+
// sendTxModal.setIdentityFieldElement('legal', 'label').should('not.have.class', 'Mui-error')
73+
// sendTxModal.buttonSend().should('be.enabled')
7474

75-
// verify the tx it sends
76-
sendTxModal.buttonSend().click()
77-
waitForTxRequest()
78-
cy.getTxRequests().then((req) => {
79-
const txRequests = Object.values(req)
80-
cy.wrap(txRequests.length).should('eq', 1)
81-
cy.wrap(txRequests[0].payload.address).should('eq', multisigSignatoryWithoutIdentity.address)
82-
sendTxModal.buttonSend().should('not.exist')
83-
sendTxModal.buttonSending().should('be.visible')
84-
// expected https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rpc.polkadot.io#/extrinsics/decode/0x1f0102000412ad770206045069201514711dc2456908b0af226442d475d12a5334e9c4513e001901000564696973056c6565670000000000000000
85-
cy.wrap(txRequests[0].payload).should(
86-
'eq',
87-
'0x1f0102000412ad770206045069201514711dc2456908b0af226442d475d12a5334e9c4513e001901000564696973056c6565670000000000000000'
88-
)
89-
})
90-
})
75+
// // verify the tx it sends
76+
// sendTxModal.buttonSend().click()
77+
// waitForTxRequest()
78+
// cy.getTxRequests().then((req) => {
79+
// const txRequests = Object.values(req)
80+
// cy.wrap(txRequests.length).should('eq', 1)
81+
// cy.wrap(txRequests[0].payload.address).should('eq', multisigSignatoryWithoutIdentity.address)
82+
// sendTxModal.buttonSend().should('not.exist')
83+
// sendTxModal.buttonSending().should('be.visible')
84+
// // expected https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rpc.polkadot.io#/extrinsics/decode/0x1f0102000412ad770206045069201514711dc2456908b0af226442d475d12a5334e9c4513e001901000564696973056c6565670000000000000000
85+
// cy.wrap(txRequests[0].payload.method).should(
86+
// 'eq',
87+
// '0x1f0102000412ad770206045069201514711dc2456908b0af226442d475d12a5334e9c4513e001901000564696973056c6565670000000000000000'
88+
// )
89+
// })
90+
// })
9191

9292
// skipping since identity now needs to be handled with the associatedppl chain
9393
it.skip('Can edit an identity from the new tx button', () => {

packages/ui/package.json

Lines changed: 37 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,36 @@
33
"version": "0.1.0",
44
"license": "Apache-2.0",
55
"dependencies": {
6-
"@emotion/react": "^11.11.4",
7-
"@emotion/styled": "^11.11.5",
8-
"@fontsource/jost": "^5.0.17",
6+
"@emotion/react": "^11.13.5",
7+
"@emotion/styled": "^11.13.5",
8+
"@fontsource/jost": "^5.1.1",
99
"@mui/base": "^5.0.0-beta.58",
10-
"@mui/material": "^5.15.15",
11-
"@mui/styled-engine": "^5.15.14",
10+
"@mui/material": "^6.1.8",
11+
"@mui/styled-engine": "^6.1.8",
1212
"@polkadot-api/descriptors": "portal:.papi/descriptors",
13-
"@polkadot-api/tx-utils": "^0.0.4",
13+
"@polkadot-api/tx-utils": "^0.0.6",
1414
"@polkadot-labs/hdkd": "^0.0.8",
1515
"@polkadot-labs/hdkd-helpers": "^0.0.8",
16-
"@polkadot/react-identicon": "^3.10.1",
17-
"@polkadot/util-crypto": "^13.1.1",
18-
"@reactive-dot/core": "^0.19.0",
19-
"@reactive-dot/react": "^0.19.0",
20-
"@tanstack/react-query": "^5.29.2",
16+
"@polkadot/react-identicon": "^3.11.3",
17+
"@polkadot/util-crypto": "^13.2.3",
18+
"@reactive-dot/core": "^0.26.2",
19+
"@reactive-dot/react": "^0.26.2",
20+
"@tanstack/react-query": "^5.61.0",
2121
"@types/react-router-dom": "^5.3.3",
22-
"@walletconnect/web3wallet": "^1.11.2",
23-
"dayjs": "^1.11.10",
24-
"dot-connect": "^0.12.0",
25-
"graphql": "^16.8.1",
26-
"graphql-request": "^6.1.0",
22+
"@walletconnect/web3wallet": "^1.16.1",
23+
"dayjs": "^1.11.13",
24+
"dot-connect": "^0.13.2",
25+
"graphql": "^16.9.0",
26+
"graphql-request": "^7.1.2",
2727
"graphql-ws": "^5.16.0",
28-
"polkadot-api": "^1.6.5",
29-
"react": "18.2.0",
30-
"react-dom": "18.2.0",
31-
"react-icons": "^5.1.0",
32-
"react-router-dom": "^6.22.3",
33-
"reactflow": "^11.11.1",
34-
"typescript": "5.4.5",
35-
"vite": "^5.4.7"
28+
"polkadot-api": "^1.7.7",
29+
"react": "18.3.1",
30+
"react-dom": "18.3.1",
31+
"react-icons": "^5.3.0",
32+
"react-router-dom": "^6.28.0",
33+
"reactflow": "^11.11.4",
34+
"typescript": "5.7.2",
35+
"vite": "^5.4.11"
3636
},
3737
"devDependencies": {
3838
"@chainsafe/cypress-polkadot-wallet": "^2.3.0",
@@ -41,22 +41,21 @@
4141
"@graphql-codegen/client-preset": "4.2.5",
4242
"@graphql-codegen/typescript-react-query": "^6.1.0",
4343
"@graphql-eslint/eslint-plugin": "^3.20.1",
44-
"@polkadot/typegen": "^13.1.1",
45-
"@types/node": "^20.12.7",
46-
"@types/react-dom": "^18.2.25",
47-
"@typescript-eslint/eslint-plugin": "^7.6.0",
48-
"@typescript-eslint/parser": "^7.6.0",
49-
"@vitejs/plugin-react": "^4.2.1",
50-
"cypress": "^13.12.0",
51-
"cypress-wait-until": "^3.0.1",
52-
"eslint": "^8.57.0",
44+
"@types/node": "^22.9.1",
45+
"@types/react-dom": "^18.3.1",
46+
"@typescript-eslint/eslint-plugin": "^8.15.0",
47+
"@typescript-eslint/parser": "^8.15.0",
48+
"@vitejs/plugin-react": "^4.3.3",
49+
"cypress": "^13.16.0",
50+
"cypress-wait-until": "^3.0.2",
51+
"eslint": "^8.57.1",
5352
"eslint-config-prettier": "^9.1.0",
54-
"eslint-plugin-cypress": "^2.15.2",
55-
"eslint-plugin-react": "^7.34.1",
56-
"eslint-plugin-react-hooks": "^4.6.0",
57-
"globals": "^15.0.0",
53+
"eslint-plugin-cypress": "^4.1.0",
54+
"eslint-plugin-react": "^7.37.2",
55+
"eslint-plugin-react-hooks": "^5.0.0",
56+
"globals": "^15.12.0",
5857
"ts-node": "^10.9.2",
59-
"vite-plugin-svgr": "^4.2.0"
58+
"vite-plugin-svgr": "^4.3.0"
6059
},
6160
"scripts": {
6261
"start": "vite --port 3333",

packages/ui/src/components/EasySetup/ManualExtrinsic.tsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -397,15 +397,18 @@
397397
// label={`${paramField.name}${paramField.optional ? ' (optional)' : ''}`}
398398
// value={inputParams[ind] ? inputParams[ind].value : ''}
399399
// onChange={(event) => onParamChange(event, { ind, paramField })}
400-
// InputProps={{
401-
// endAdornment: isTypeBalanceWithBalanceCall(
402-
// paramField.typeName,
403-
// `${palletRpc}.${callable}`
404-
// ) && (
405-
// <InputAdornment position="end">{chainInfo?.tokenSymbol || ''}</InputAdornment>
406-
// )
400+
// slotProps={{
401+
// input: {
402+
// endAdornment: isTypeBalanceWithBalanceCall(
403+
// paramField.typeName,
404+
// `${palletRpc}.${callable}`
405+
// ) && (
406+
// <InputAdornment position="end">{chainInfo?.tokenSymbol || ''}</InputAdornment>
407+
// )
408+
// },
409+
410+
// htmlInput: { 'data-cy': `param-input-${paramField.name}` }
407411
// }}
408-
// inputProps={{ 'data-cy': `param-input-${paramField.name}` }}
409412
// />
410413
// </li>
411414
// )

packages/ui/src/components/library/Autocomplete.tsx

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1-
import { Autocomplete as AutocompleteMui, Box, Popper } from '@mui/material'
1+
import {
2+
AutocompleteFreeSoloValueMapping,
3+
Autocomplete as AutocompleteMui,
4+
Box,
5+
FilterOptionsState,
6+
Popper
7+
} from '@mui/material'
28
import React from 'react'
39
import { styled } from '@mui/material/styles'
410
import {
11+
AutocompleteInputChangeReason,
512
AutocompleteRenderInputParams,
6-
AutocompleteRenderOptionState
13+
AutocompleteRenderOptionState,
14+
AutocompleteValue
715
} from '@mui/material/Autocomplete/Autocomplete'
816
import { HiOutlineChevronDown } from 'react-icons/hi2'
9-
import {
10-
AutocompleteFreeSoloValueMapping,
11-
AutocompleteInputChangeReason,
12-
AutocompleteValue,
13-
FilterOptionsState
14-
} from '@mui/base'
1517
import { theme } from '../../styles/theme'
1618

1719
interface AutocompleteProps<T, Multiple, DisableClearable, FreeSolo> {
@@ -89,8 +91,10 @@ const Autocomplete = <
8991
renderOption={renderOption}
9092
popupIcon={<HiOutlineChevronDown />}
9193
renderInput={renderInput}
92-
PopperComponent={PopperStyled}
9394
{...props}
95+
slots={{
96+
popper: PopperStyled
97+
}}
9498
/>
9599
</AutocompleteWrapper>
96100
)

packages/ui/src/components/select/MultiProxySelection.tsx

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -169,18 +169,23 @@ const MultiProxySelection = ({ className, testId = '' }: Props) => {
169169
{...params}
170170
inputRef={ref}
171171
label=""
172-
InputProps={{
173-
...params.InputProps,
174-
startAdornment: addressToShow && (
175-
<InputAdornment position="start">
176-
<IdenticonBadge
177-
address={addressToShow}
178-
badge={isSelectedProxy ? AccountBadge.PURE : AccountBadge.MULTI}
179-
/>
180-
</InputAdornment>
181-
)
172+
slotProps={{
173+
input: {
174+
...params.InputProps,
175+
startAdornment: addressToShow && (
176+
<InputAdornment position="start">
177+
<IdenticonBadge
178+
address={addressToShow}
179+
badge={isSelectedProxy ? AccountBadge.PURE : AccountBadge.MULTI}
180+
/>
181+
</InputAdornment>
182+
)
183+
},
184+
htmlInput: {
185+
...params.inputProps,
186+
'data-cy': `input-select-multiproxy-${testId}`
187+
}
182188
}}
183-
inputProps={{ ...params.inputProps, 'data-cy': `input-select-multiproxy-${testId}` }}
184189
onKeyDown={handleSpecialKeys}
185190
/>
186191
)

packages/ui/src/components/select/OptionMenuItem.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ interface OptionMenuProps {
1010
const OptionMenuItem = ({ keyValue, children, ...props }: OptionMenuProps) => (
1111
<BoxStyled
1212
key={keyValue}
13-
component="li"
1413
{...props}
1514
>
1615
{children}

packages/ui/src/styles/theme.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,4 +196,4 @@ export const theme = createTheme({
196196
red: 'firebrick'
197197
}
198198
}
199-
} as ThemeOptions)
199+
} as Omit<ThemeOptions, 'components'>)

packages/ui/src/utils/isValidAddress.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const isValidAddress = (address: string | Uint8Array | null | undefined)
66
encodeAddress(isHex(address) ? hexToU8a(address) : decodeAddress(address))
77

88
return true
9-
} catch (error) {
9+
} catch {
1010
// if it's an ethereum address it can't be decoded but could still be valid
1111
if (typeof address === 'string' && address.startsWith('0x') && address.length === 42) {
1212
return true

packages/ui/src/walletConfigs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import type { Config } from '@reactive-dot/core'
2-
import { InjectedWalletAggregator } from '@reactive-dot/core/wallets.js'
2+
import { InjectedWalletProvider } from '@reactive-dot/core/wallets.js'
33
import { registerDotConnect } from 'dot-connect'
44
import { DAPP_NAME } from './constants'
55

66
export const config = {
77
chains: {},
8-
wallets: [new InjectedWalletAggregator({ originName: DAPP_NAME })]
8+
wallets: [new InjectedWalletProvider({ originName: DAPP_NAME })]
99
} satisfies Config
1010

1111
// Register dot-connect custom elements & configure supported wallets

0 commit comments

Comments
 (0)