-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate extension wallet to Manifest V3 architecture #2120
Conversation
Deployed to Cloudflare Pages
|
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
76eb767
to
ef70d08
Compare
@@ -8,7 +8,7 @@ import type { | |||
} from '../../src/vendors/nexus/index' | |||
import { StringifiedBigInt } from '../../src/types/StringifiedBigInt' | |||
|
|||
export async function mockApi(context: BrowserContext | Page, balance: StringifiedBigInt) { | |||
export async function mockApi(context: BrowserContext | Page, balance: number | StringifiedBigInt) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh I did not update all mockApi usage. this is minor and not related to this PR, but Account['available']
would be more accurate. can bump it once this is one is merged if that works for you.
src/app/state/persist/saga.ts
Outdated
yield* fork(function* () { | ||
const channelQueue = yield* actionChannel<AnyAction>('*') | ||
let previousStringifiedEncryptionKey: PersistState['stringifiedEncryptionKey'] = undefined | ||
while (true) { | ||
yield* take(channelQueue) | ||
const stringifiedEncryptionKey = yield* select(selectStringifiedEncryptionKey) | ||
if (stringifiedEncryptionKey !== previousStringifiedEncryptionKey) { | ||
previousStringifiedEncryptionKey = stringifiedEncryptionKey | ||
yield* call(writeSharedExtMemory, stringifiedEncryptionKey) | ||
} | ||
} | ||
}) | ||
|
||
yield* fork(function* () { | ||
const encryptedState = window.localStorage.getItem( | ||
STORAGE_FIELD, | ||
) as EncryptedString<PersistedRootState> | null | ||
if (!encryptedState) return // Ignore | ||
try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From michal: does order matter?
does look risky to write before reading the stored value from previous session
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, bfe226e breaks v0 migration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah I lost one commit during squashing
bfe226e
to
922a75d
Compare
Report too large to display inline |
922a75d
to
330eb29
Compare
Supersedes #2084
Built on top of #2118
Diff vs #2084: https://github.com/oasisprotocol/wallet/compare/ca34c34d91e928ad545445648bd8152bc459c5b9..76eb7677053b22541c332b21f38237882d2cbaeb