Files
bls-wallet/extension/source/cells/jsonHasChanged.ts
Andrew Morris e671e73e0f Cells (#221)
* wip StorageManager

* Fixes, add iteration

* Use default to ensure there's always a value

* Define IReadableCell, split out ReadableCellIterator

* FormulaCell

* Remove unused functions

* Rename to cells/ExtensionLocalStorage.ts

* StorageCell -> ExtensionLocalCell

* Split out ICell

* Split out CellIterator

* MemoryCell.ts

* Split out FormulaCell

* ReadableCellIterator -> CellIterator

* Define IAsyncStorage abstraction and use it to generalize ExtensionLocalStorage

* MemoryCellCollection.ts

* Enable removing cells

* useCell.ts, useReadableCell.ts

* Add cells demo

* CellDisplay

* Add counters

* Allow mixing unknowns in CellCollection

* Quill cells

* Allow async formulas

* Use a cell for CurrencyController.state

* Use versionedType when reading

* QuillContext

* Fix window.QuillController() in WalletWrapper

* Replace internal rpc with public+private

* Move eth_accounts into typed rpc

* Replace KeyringController().getAccounts with rpc.public.eth_accounts

* Replace KeyringController().createHdAccount with rpc.private.quill_createHdAccount

* Fix .KeyringController in WalletPage

* Fix CellIterator undefined bug

* useNewCell

* Avoid useCellWithFallback

* Remove useNewCell

* useCellState

* tmp

* Add events to IAsyncStorage, change extensionLocalStorage to singleton

* Use change events in CellCollection

* Allow cleaning up the change handler

* localCellCollection

* Use extensionLocalCellCollection in demo

* Fix demo page

* Make FormulaCell lazy

* Stop iteration more actively

* Fix cleanup of end handler

* Use elcc

* Add blockNumber cell

* Page selection, ethersProvider

* nitpicks

* Balance demo

* More event cleanup fixes

* Improve label

* Add dark-theme

* Remove obsoleted rpc-based cell collection

* Cleanup

* DemoTable

* Add cells readme

* Fix theme persistence

* Remove regex check

* Avoid casting window

* Use ChangeEvent to avoid cast

* Move cells demo into its own page

* Fix linting issues
2022-06-15 20:44:24 -04:00

4 lines
144 B
TypeScript

export default function jsonHasChanged<T>(previous: T | undefined, latest: T) {
return JSON.stringify(previous) !== JSON.stringify(latest);
}