Skip to content

Commit

Permalink
Resolve ui bug #5
Browse files Browse the repository at this point in the history
  • Loading branch information
Thiendekaco committed Feb 28, 2024
1 parent 4ff0108 commit ecc4575
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 20 deletions.
19 changes: 9 additions & 10 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions packages/core/src/views/connect/Index.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,6 @@
let { balance, secondaryTokens } = accounts[0]
if (balance === null) {
console.log('123123')
await getBalance(address, appChain, type).then(balance => {
updateAccount(selectedWallet.label, address, {
balance
Expand Down Expand Up @@ -479,7 +478,7 @@
// return;
// }
// }
setTimeout(() => connectWallet$.next({ inProgress: false }), 1500)
setTimeout(() => connectWallet$.next({ inProgress: false }), 500)
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/views/connect/Sidebar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
.icon-container {
display: flex;
height: fit-content;
width: auto;
width: 56px;
min-width: 3.5rem;
max-width: 100%;
}
Expand Down
6 changes: 5 additions & 1 deletion packages/demo/src/components/account/AccountCardItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export interface _AccountCardItem {
function Component (props: _AccountCardItem): React.ReactElement<_AccountCardItem> {
const { account, className, isSelected } = props;


const token = useContext<Theme>(ThemeContext as Context<Theme>).token;

const avatarTheme = useAccountAvatarTheme(account.address || '');
Expand All @@ -42,7 +43,10 @@ function Component (props: _AccountCardItem): React.ReactElement<_AccountCardIte
/>
</div>
<div className='__item-center-part'>
<div className='__item-name'>{account.uns?.name || account.ens?.name || toShort(account.address)}</div>
<div className='__item-name'>
{account.uns?.name || account.ens?.name || toShort(account.address)}

</div>
<div className='__item-address'>{toShort(account.address, 9, 9)}</div>
</div>
<div className='__item-right-part'>
Expand Down
2 changes: 1 addition & 1 deletion packages/demo/src/constants/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ export const CONTACT_US = 'https://t.me/subwallet';
export const ALL_KEY = 'all';
export const HELP_URL = 'https://docs.subwallet.app/main/';

export const INSTALL_WALLET = 'https://ethereum.org/en/wallets/find-wallet#main-content'
export const INSTALL_WALLET = 'https://www.subwallet.app/download.html'

export const THEME_BACKGROUND_COLOR = 'theme-background-color';
2 changes: 2 additions & 0 deletions packages/demo/src/pages/Welcome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ function Component ({ className }: Props): React.ReactElement {
<a
className={'__welcome-install_link'}
href={INSTALL_WALLET}
target="_blank"
rel="noreferrer noopener"
>
<Icon
phosphorIcon={Info}
Expand Down
4 changes: 2 additions & 2 deletions packages/demo/src/web3-onboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const metamaskSDKWallet = metamaskSDK({
},
infuraAPIKey : INFURA_KEY,
dappMetadata: {
name: 'Demo Web3Onboard'
name: 'SubConnect'
}
}
})
Expand Down Expand Up @@ -199,7 +199,7 @@ export default init({

appMetadata: {
// The name of your dApp
name: 'SubWallet Connect',
name: 'SubConnect',

icon: SubWallet,

Expand Down
2 changes: 1 addition & 1 deletion packages/polkadotJs/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function SubWallet (): WalletInit {
const isInstalled = (extensionName: string) => {
const injectedWindow = window as unknown as Window & InjectedWindow;
const injectedExtension =
injectedWindow?.injectedWeb3[extensionName]
injectedWindow?.injectedWeb3 && injectedWindow?.injectedWeb3[extensionName]
return !!injectedExtension;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/subwalletPolkadot/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function SubWallet (): WalletInit {
const isInstalled = (extensionName: string) => {
const injectedWindow = window as unknown as Window & InjectedWindow;
const injectedExtension =
injectedWindow?.injectedWeb3[extensionName]
injectedWindow?.injectedWeb3 && injectedWindow?.injectedWeb3[extensionName]
return !!injectedExtension;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/talisman/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function SubWallet (): WalletInit {
const isInstalled = (extensionName: string) => {
const injectedWindow = window as unknown as Window & InjectedWindow;
const injectedExtension =
injectedWindow?.injectedWeb3[extensionName]
injectedWindow?.injectedWeb3 && injectedWindow?.injectedWeb3[extensionName]
return !!injectedExtension;
}

Expand Down

0 comments on commit ecc4575

Please sign in to comment.