Skip to content

Commit

Permalink
Merge branch 'main' into video-avatar
Browse files Browse the repository at this point in the history
  • Loading branch information
jagodarybacka committed Dec 18, 2023
2 parents 2cca702 + cb10d5e commit 58d05ab
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 17 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/BUG.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ body:
label: Version
description: What version of the extension are you running?
options:
- v0.53.1
- v0.53.0
- v0.52.0
- v0.51.0
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/test-list/release-test-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ This release checklist should be performed before release is published.
🤖 Items marked with this emoji are good candidates for automation (although
it does not mean that they all would be obsolete once automated).

### 📝 Background processes

1. During execution of other tests on the list monitor extension's DevTools
- [ ] check that there are no problematic errors in the Console tab
- [ ] check the number of requests on the Network tab (the number shouldn't
increase significantly in periods of user inactivity)

### 📨 Add account

1. Add read-only account with ENS
Expand Down
2 changes: 1 addition & 1 deletion background/constants/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export const CHAIN_ID_TO_0X_API_BASE: {
[POLYGON.chainID]: "polygon.api.0x.org",
[OPTIMISM.chainID]: "optimism.api.0x.org",
[GOERLI.chainID]: "goerli.api.0x.org",
// TODO: Add Swap API for Sepolia once 0x supports it.
[SEPOLIA.chainID]: "sepolia.api.0x.org",
[ARBITRUM_ONE.chainID]: "arbitrum.api.0x.org",
[AVALANCHE.chainID]: "avalanche.api.0x.org",
[BINANCE_SMART_CHAIN.chainID]: "bsc.api.0x.org",
Expand Down
2 changes: 1 addition & 1 deletion background/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1977,7 +1977,7 @@ export default class Main extends BaseService<never> {

async removeEVMNetwork(chainID: string): Promise<void> {
// Per origin chain id settings
await this.internalEthereumProviderService.removePrefererencesForChain(
await this.internalEthereumProviderService.removePreferencesForChain(
chainID,
)
// Connected dApps
Expand Down
2 changes: 1 addition & 1 deletion background/services/internal-ethereum-provider/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ export default class InternalEthereumProviderService extends BaseService<Events>
return currentNetwork
}

async removePrefererencesForChain(chainId: string): Promise<void> {
async removePreferencesForChain(chainId: string): Promise<void> {
await this.db.removeStoredPreferencesForChain(chainId)
}

Expand Down
2 changes: 1 addition & 1 deletion manifest/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Taho",
"version": "0.53.0",
"version": "0.53.1",
"description": "The community owned and operated Web3 wallet.",
"homepage_url": "https://taho.xyz",
"author": "https://taho.xyz",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tallyho/tally-extension",
"private": true,
"version": "0.53.0",
"version": "0.53.1",
"description": "Taho, the community owned and operated Web3 wallet.",
"main": "index.js",
"repository": "git@github.com:thesis/tally-extension.git",
Expand Down
3 changes: 3 additions & 0 deletions ui/components/Shared/SharedAddressInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ type Props = {
value: { address: HexString; name?: string } | undefined,
) => void
onFocus?: () => void
onKeyDown?: React.KeyboardEventHandler<HTMLInputElement>
id?: string
placeholder?: string
isEmpty?: boolean
Expand All @@ -23,6 +24,7 @@ export default function SharedAddressInput({
label,
onAddressChange,
onFocus,
onKeyDown,
id,
placeholder,
isEmpty,
Expand All @@ -48,6 +50,7 @@ export default function SharedAddressInput({
label={label}
onChange={setInputValue}
onFocus={onFocus}
onKeyDown={onKeyDown}
errorMessage={errorMessage}
id={id}
placeholder={placeholder}
Expand Down
3 changes: 3 additions & 0 deletions ui/components/Shared/SharedInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ interface Props<T> {
value?: string | undefined
onChange?: (value: T | undefined) => void
onFocus?: () => void
onKeyDown?: React.KeyboardEventHandler<HTMLInputElement>
errorMessage?: string
warningMessage?: string
autoFocus?: boolean
Expand All @@ -37,6 +38,7 @@ export function SharedTypedInput<T = string>(props: Props<T>): ReactElement {
name,
onChange,
onFocus,
onKeyDown,
value: currentValue,
errorMessage,
warningMessage,
Expand Down Expand Up @@ -92,6 +94,7 @@ export function SharedTypedInput<T = string>(props: Props<T>): ReactElement {
handleInputChange(event.target.value)
}
onFocus={onFocus}
onKeyDown={onKeyDown}
data-empty={inputValue.trim().length < 1}
className={classNames({
error: !isEmpty && (errorMessage ?? parserError !== undefined),
Expand Down
35 changes: 23 additions & 12 deletions ui/pages/Onboarding/Tabbed/ViewOnlyWallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ export default function ViewOnlyWallet(): ReactElement {
)

const handleSubmitViewOnlyAddress = useCallback(async () => {
if (addressOnNetwork === undefined) {
return
}
if (addressOnNetwork === undefined) return

await dispatch(addAddressNetwork(addressOnNetwork))

Expand All @@ -63,6 +61,22 @@ export default function ViewOnlyWallet(): ReactElement {
setRedirect(true)
}, [dispatch, addressOnNetwork])

const handleFormSubmitOnEnter = (
event: React.KeyboardEvent<HTMLInputElement>,
) => {
if (event.key === "Enter") {
event.preventDefault()
handleSubmitViewOnlyAddress()
}
}

const handleFormSubmitOnClick = (
event: React.MouseEvent<HTMLButtonElement, MouseEvent>,
) => {
event.preventDefault()
handleSubmitViewOnlyAddress()
}

// Redirect to the final onboarding tab once an account is set
if (redirect) {
return <Redirect to={OnboardingRoutes.ONBOARDING_COMPLETE} />
Expand All @@ -84,23 +98,20 @@ export default function ViewOnlyWallet(): ReactElement {
</div>
</header>
<div className="content">
<form
onSubmit={(event) => {
event.preventDefault()
handleSubmitViewOnlyAddress()
}}
>
<form>
<div className="input_wrap">
<SharedAddressInput onAddressChange={handleNewAddress} />
<SharedAddressInput
onAddressChange={handleNewAddress}
onKeyDown={handleFormSubmitOnEnter}
/>
</div>
<SharedButton
type="primary"
size="large"
onClick={handleSubmitViewOnlyAddress}
onClick={handleFormSubmitOnClick}
isDisabled={addressOnNetwork === undefined}
showLoadingOnClick
center
isFormSubmit
>
{t("submit")}
</SharedButton>
Expand Down

0 comments on commit 58d05ab

Please sign in to comment.