Skip to content

Commit 5371e14

Browse files
authored
Merge branch 'master' into newaichat
2 parents 5c1e800 + 4ccf3fb commit 5371e14

File tree

6 files changed

+9
-23
lines changed

6 files changed

+9
-23
lines changed

apps/remix-ide/src/blockchain/blockchain.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -623,10 +623,6 @@ export class Blockchain extends Plugin {
623623
return this.executionContext.getProviderObject()
624624
}
625625

626-
getInjectedWeb3Address() {
627-
return this.executionContext.getSelectedAddress()
628-
}
629-
630626
/**
631627
* return the fork name applied to the current environment
632628
* @return {String} - fork name

apps/remix-ide/src/blockchain/execution-context.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@ export class ExecutionContext {
4949
return this.customNetWorks[this.executionContext]
5050
}
5151

52-
getSelectedAddress () {
53-
return injectedProvider ? injectedProvider.selectedAddress : null
54-
}
55-
5652
getCurrentFork () {
5753
return this.currentFork
5854
}

apps/remix-ide/src/index.tsx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import React from 'react'
33
import './index.css'
44
import { ThemeModule } from './app/tabs/theme-module'
55
import { Preload } from './app/components/preload'
6-
import { BrowserRouter, Routes, Route } from 'react-router-dom'
76
import { GitHubPopupCallback } from './app/pages/GitHubPopupCallback'
87
import Config from './config'
98
import { Registry } from '@remix-project/remix-lib'
@@ -23,13 +22,13 @@ import { createRoot } from 'react-dom/client'
2322
const container = document.getElementById('root');
2423
const root = createRoot(container)
2524
if (container) {
26-
root.render(
27-
<BrowserRouter>
28-
<Routes>
29-
<Route path="/auth/github/callback" element={<GitHubPopupCallback />} />
30-
<Route path="*" element={<Preload root={root} />} />
31-
</Routes>
32-
</BrowserRouter>
33-
)
25+
if (window.location.hash.includes('source=github')) {
26+
root.render(
27+
<GitHubPopupCallback />
28+
)
29+
} else {
30+
root.render(
31+
<Preload root={root} />)
32+
}
3433
}
3534
})()

libs/remix-ui/git/src/components/github/devicecode.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export const GetDeviceCode = () => {
4949
}
5050

5151
const clientId = await getClientId()
52-
const redirectUri = `${window.location.origin}/auth/github/callback`
52+
const redirectUri = `${window.location.origin}/?source=github`
5353
const scope = 'repo gist user:email read:user'
5454

5555
const url = `https://github.com/login/oauth/authorize?client_id=${clientId}&redirect_uri=${encodeURIComponent(redirectUri)}&scope=${encodeURIComponent(scope)}&response_type=code`

libs/remix-ui/run-tab/src/lib/actions/account.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@ export const fillAccountsList = async (plugin: RunTab, dispatch: React.Dispatch<
4949
loadedAccounts[account] = shortenAddress(account, balance)
5050
if (safeAddresses.length && safeAddresses.includes(account)) loadedAccounts[account] = `[SMART] ${loadedAccounts[account]}`
5151
}
52-
if (provider && provider.startsWith('injected')) {
53-
const selectedAddress = plugin.blockchain.getInjectedWeb3Address()
54-
if (selectedAddress && !(Object.keys(loadedAccounts).includes(toChecksumAddress(selectedAddress)))) setAccount(dispatch, null)
55-
}
5652
dispatch(fetchAccountsListSuccess(loadedAccounts))
5753
} catch (e) {
5854
dispatch(fetchAccountsListFailed(e.message))

libs/remix-ui/run-tab/src/lib/types/blockchain.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ export class Blockchain extends Plugin<any, any> {
4141
changeExecutionContext(context: any, confirmCb: any, infoCb: any, cb: any): Promise<any>;
4242
detectNetwork(cb: any): void;
4343
getProvider(): any;
44-
getInjectedWeb3Address(): any;
4544
/**
4645
* return the fork name applied to the current environment
4746
* @return {String} - fork name

0 commit comments

Comments
 (0)