Skip to content

Commit cd83aeb

Browse files
authored
[core-v2.8.4-alpha.1, react-v2.3.4-alpha.1, vue-v2.2.4-alpha.1]: Fix - AC UI balance & rpcUrl whitespace bug (#1270)
* refine styling * Bump vue and react * Revert size change * Update github issue templates
1 parent 98bc302 commit cd83aeb

File tree

10 files changed

+42
-37
lines changed

10 files changed

+42
-37
lines changed

.github/ISSUE_TEMPLATE/BUG.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ assignees:
66
- taylorjdawson
77
- aaronbarnardsound
88
- Adamj1232
9-
- mahmud-bn
109
body:
1110
- type: markdown
1211
attributes:

.github/ISSUE_TEMPLATE/FEATURE.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ labels: [feature]
55
assignees:
66
- taylorjdawson
77
- aaronbarnardsound
8+
- Adamj1232
89
body:
910
- type: markdown
1011
attributes:

packages/core/src/store/actions.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,11 @@ export function addChains(chains: Chain[]): void {
6464
// chains are validated on init
6565
const action = {
6666
type: ADD_CHAINS,
67-
payload: chains.map(({ namespace = 'evm', id, ...rest }) => ({
67+
payload: chains.map(({ namespace = 'evm', id, rpcUrl, ...rest }) => ({
6868
...rest,
6969
namespace,
70-
id: id.toLowerCase()
70+
id: id.toLowerCase(),
71+
rpcUrl: rpcUrl.trim()
7172
}))
7273
}
7374

packages/core/src/views/account-center/Maximized.svelte

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import WalletAppBadge from '../shared/WalletAppBadge.svelte'
1414
import { getDefaultChainStyles, unrecognizedChainStyle } from '../../utils.js'
1515
import SuccessStatusIcon from '../shared/SuccessStatusIcon.svelte'
16-
import NetworkBadgeSelector from '../shared/NetworkSelector.svelte'
16+
import NetworkSelector from '../shared/NetworkSelector.svelte'
1717
import caretLightIcon from '../../icons/caret-light.js'
1818
import warningIcon from '../../icons/warning.js'
1919
import questionIcon from '../../icons/question.js'
@@ -137,6 +137,7 @@
137137
138138
.network-selector-container {
139139
margin-left: 1rem;
140+
width: 100%;
140141
}
141142
142143
.network-selector-label {
@@ -336,12 +337,13 @@
336337
default: en.accountCenter.currentNetwork
337338
})}
338339
</div>
339-
<div on:click class="flex items-center">
340-
<NetworkBadgeSelector
340+
<div on:click class="flex items-center" style=" width: 100%;">
341+
<NetworkSelector
341342
chains={appChains}
342343
colorVar="--account-center-maximized-network-selector-color"
343344
bold={true}
344345
selectIcon={caretLightIcon}
346+
parentCSSId="maximized_ac"
345347
/>
346348
</div>
347349
</div>

packages/core/src/views/account-center/Minimized.svelte

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,14 @@
9090
font-weight: 400;
9191
line-height: var(--onboard-font-line-height-2, var(--font-line-height-2));
9292
color: var(--onboard-gray-400, var(--gray-400));
93+
overflow: hidden;
94+
white-space: nowrap;
95+
text-overflow: ellipsis;
96+
width: 7.25rem;
9397
}
9498
9599
.network {
96-
margin-left: 0.5rem;
100+
margin-left: 0.2rem;
97101
}
98102
99103
.chain-icon {
@@ -210,6 +214,7 @@
210214
{chains}
211215
colorVar="--account-center-minimized-network-selector-color"
212216
selectIcon={caretIcon}
217+
parentCSSId="minimized_ac"
213218
/>
214219
</div>
215220
</div>

packages/core/src/views/account-center/WalletRow.svelte

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,15 @@
9797
margin-left: 0.5rem;
9898
color: var(--onboard-gray-300, var(--gray-300));
9999
transition: color 150ms ease-in-out, background-color 150ms ease-in-out;
100+
overflow: hidden;
101+
white-space: nowrap;
102+
text-overflow: ellipsis;
103+
width: 7.25rem;
100104
}
101105
102106
.elipsis-container {
103107
padding: 0.25rem;
104-
margin-left: 0.5rem;
108+
margin-left: 0.25rem;
105109
border-radius: 24px;
106110
transition: color 150ms ease-in-out, background-color 150ms ease-in-out;
107111
background-color: transparent;

packages/core/src/views/shared/NetworkSelector.svelte

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
export let colorVar: string
1212
export let chains: Chain[]
1313
export let bold = false
14+
export let parentCSSId = ''
1415
1516
const switching$ = new BehaviorSubject<boolean>(false)
1617
let selectElement: HTMLSelectElement
@@ -73,39 +74,50 @@
7374
appearance: none;
7475
font-size: var(--onboard-font-size-7, var(--font-size-7));
7576
line-height: var(--onboard-font-line-height-3, var(--font-line-height-3));
76-
max-width: 90px;
77-
min-width: 72px;
7877
transition: width 250ms ease-in-out;
7978
background-repeat: no-repeat, repeat;
8079
background-position: right 0px top 0px, 0 0;
8180
scrollbar-width: none;
8281
-ms-overflow-style: none;
83-
padding: 0 16px 0 0;
82+
padding: 0 14px 0 0;
83+
white-space: nowrap;
84+
text-overflow: ellipsis;
85+
}
86+
87+
select.minimized_ac {
88+
min-width: 80px;
89+
max-width: 80px;
90+
}
91+
92+
select.maximized_ac {
93+
width: auto !important;
8494
}
8595
8696
select:focus {
8797
outline: none;
8898
}
8999
90-
span {
100+
span.switching-placeholder {
91101
font-size: var(--onboard-font-size-7, var(--font-size-7));
92102
line-height: var(--onboard-font-line-height-3, var(--font-line-height-3));
103+
min-width: 80px;
104+
max-width: 80px;
105+
padding: 0 8px 0 4px;
93106
}
94107
</style>
95108

96109
{#if wallet}
97110
{#if $switching$}
98111
<span
112+
class={`switching-placeholder ${parentCSSId}`}
99113
style={`
100114
color: var(${colorVar},
101115
var(--account-center-network-selector-color, var (--gray-500)));
102-
padding: 0 8px 0 4px;
103-
`}
104-
>switching...</span
116+
`}>switching...</span
105117
>
106118
{:else}
107119
<select
108-
class="flex justify-center items-center pointer"
120+
class={`flex justify-center items-center pointer ${parentCSSId}`}
109121
bind:this={selectElement}
110122
value={wallet.chains[0].id}
111123
on:change={handleSelect}

packages/react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@web3-onboard/react",
3-
"version": "2.3.3",
3+
"version": "2.3.4-alpha.1",
44
"description": "A collection of React hooks for integrating Web3-Onboard in to React and Next.js projects. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
55
"keywords": [
66
"Ethereum",

packages/vue/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@web3-onboard/vue",
3-
"version": "2.2.3",
3+
"version": "2.2.4-alpha.1",
44
"description": "A collection of Vue Composables for integrating Web3-Onboard in to a Vue or Nuxt project. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
55
"keywords": [
66
"Ethereum",

yarn.lock

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2953,25 +2953,6 @@
29532953
dependencies:
29542954
"@walletconnect/window-getters" "^1.0.0"
29552955

2956-
"@web3-onboard/core@^2.8.2":
2957-
version "2.8.2"
2958-
resolved "https://registry.yarnpkg.com/@web3-onboard/core/-/core-2.8.2.tgz#70d1730384a3e028bbe07769086361db5c631d78"
2959-
integrity sha512-AE2xQVKsmjtvW7lI7xFFdfAtoLxmZRa9qfCv5MtHRDY9Ojqkj06dLgteJmB4FBFZnh79iXoKbIj7N+vRpvjHIw==
2960-
dependencies:
2961-
"@web3-onboard/common" "^2.2.2"
2962-
bignumber.js "^9.0.0"
2963-
bnc-sdk "^4.4.1"
2964-
bowser "^2.11.0"
2965-
ethers "5.5.3"
2966-
eventemitter3 "^4.0.7"
2967-
joi "17.6.0"
2968-
lodash.merge "^4.6.2"
2969-
lodash.partition "^4.6.0"
2970-
nanoid "^4.0.0"
2971-
rxjs "^7.5.2"
2972-
svelte "^3.49.0"
2973-
svelte-i18n "^3.3.13"
2974-
29752956
"@web3auth/base-plugin@^1.0.1":
29762957
version "1.0.1"
29772958
resolved "https://registry.yarnpkg.com/@web3auth/base-plugin/-/base-plugin-1.0.1.tgz#1e2a87acf745299fdff6f92e6c46ee9bc38aa670"

0 commit comments

Comments
 (0)