-
Notifications
You must be signed in to change notification settings - Fork 38
add Account domain and implement redux-saga #244
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
Merged
Merged
Changes from all commits
Commits
Show all changes
130 commits
Select commit
Hold shift + click to select a range
09bbdb3
cosigner pair view
louisinger ca4b1fb
add cosigner in settings menu
louisinger e2ee44d
bump ldk
louisinger cd5297d
add account domain and MainAccount in Wallet reducer
louisinger 87c03a4
clean unused import
louisinger 66b8888
wip multisig account
louisinger 442e46a
comment account domain
louisinger 6132cd7
move utxos and txs to wallet reducer
louisinger 5356c12
refacto WalletState (former 'IWallet')
louisinger 3c0a544
flush all accounts utxos in networks menu
louisinger ed0a562
fix imports
louisinger e63852a
updaters depends on Account domain
louisinger 4b0d1f9
ADD_RESTRICTED_ACCOUNT_DATA action
louisinger f8392d4
UI cleaning
louisinger 9ff562b
use restored from state for Multisig accounts
louisinger 941747f
pair-sucess page
louisinger e53da0a
drop isRegtestAsset
louisinger f6a87df
MultisigWithCosigner Identity
louisinger 639a2f1
updaterWorker logic
louisinger d750c04
fix deleteUtxo action
louisinger 8dbc7e2
cleaning and prettier
louisinger ea42cff
only one account
louisinger 9095aef
balances for several accounts
louisinger b50eecb
selectTransactions and selectUtxos for all accounts
louisinger 77ec2e0
prettier and lint
louisinger d738c8d
MainAccountID constant in MmenmonicAccount
louisinger 6457633
refacto choose-fee component
louisinger 941386a
blind with blinder
louisinger 8772211
send with multiple accounts
louisinger d0d57c7
fix blindPSET with several identities
louisinger cafaed5
multiple providers implementation
louisinger 1586541
allow UI (connect popup)
louisinger 03312f9
allow remove cosigner URL in pairing form
louisinger 5cc6b69
allow coin better params + returns the sighash none pset
louisinger 3e27a43
first version of coinos provider
louisinger f5b4b42
add key attribute in allow-coin.tsx
louisinger c296a21
refacto onboarding create wallet form + add checkbox to pair with cos…
louisinger 035ab8e
bump ldk & liquidjs-lib
louisinger 6e2aa61
no need redeemscript anymore
louisinger 2161155
prettier and lint
louisinger 63668b2
avoid dust in spend.test.ts
louisinger 09f103c
implment async tasks using redux-saga (and drop thunks)
louisinger e05784e
end of sagas
louisinger 4332934
remove utxos/txs update and replace by "updateTask"
louisinger 47edddd
lint and prettier
louisinger f47ac67
remove createAddress in wallet.ts utils file
louisinger c17efef
prettier
louisinger f36261f
asset updater
louisinger 2bcb4c2
prettier
louisinger 0995b6a
utxos updater with saga done
louisinger ad6987e
updater workers in background: 3
louisinger 7ad890d
remove console.warm logs
louisinger 33eeab9
remove restricted account feature
louisinger 5468096
prettier
louisinger e9ea27f
linter
louisinger 05f7ca3
merge with master + fix conflicts
louisinger eb5b204
prettier and lint
louisinger 6cade93
ignore fetch taxi errors
louisinger 166accf
prettier fix
louisinger d45517c
fix address increment (handle -Inf case)
louisinger 2656069
wallet-restore & wallet-create css changes --> OnboardingForm
louisinger 0e229f6
SaveMnemonicModal in ReceiveSendButtons component
louisinger 403e6c4
revert update tx history effect in TransactionsView
louisinger 3243fd7
document redux/actions/setOnboardingVerified
louisinger 2892695
prettier
louisinger 813261a
add isFullyBlinded check in blindAndSignPset
louisinger f736493
add migration manifest for wallet reducer
louisinger f461ab1
refacto increment
louisinger 2890087
"invalid *" strings in constant file
louisinger 00d8449
compute utxos from transactions
louisinger 86b5cda
unit test for migration
louisinger 5112c92
fix rendering error in Login Form
louisinger 2539ca6
bump ldk
louisinger 603b6d8
comment customSagaParser
louisinger 9680c4f
use wallet.sendTx and add "SEND ALL" button in send page
louisinger 1ee0ca6
Merge branch 'master' into account
louisinger 5c04a96
protect transactions.tsx component if location state is null
louisinger 522e5e5
send end of flow: add signedTx to location state in case of error
louisinger 42e95dd
Update src/domain/account.ts
louisinger b777c29
typeof MainAccountID (account.ts)
louisinger 55db03d
fetch asset info updating (ticker != name)
louisinger b126ed3
Merge branch 'master' into account
tiero 293995c
handle errors in assetWorker
louisinger c90e411
Merge branch 'account' of github.com:louisinger/marina into account
louisinger 8a3a6c7
do not relaunch periodic updater if any is running
louisinger 338a04d
cleaning
louisinger 58a77ef
force the lang of input in address-amount-form
louisinger e32570b
Revert "compute utxos from transactions"
louisinger 577973d
update after revert
louisinger 57a5fa2
Merge branch 'master' into account
louisinger 9bea6d1
smart management of network switching
louisinger b0ea612
fetch asset info according to network unspent
louisinger 3e49cb3
Merge branch 'master' into account
louisinger 03f900b
remove application/utils/index.ts
louisinger 6d40083
prettier
louisinger 9d8b118
merge with master
louisinger 30b9b8e
Merge branch 'master' into account
louisinger 38e96ef
fix sendAll unfeatured asset
louisinger 5c4738e
start a periodic update of assets in utxos set with updater
louisinger b55af7f
use browser.alarms for periodic tasks
louisinger ddff8a5
Merge branch 'master' into account
louisinger 2d4aef8
Merge branch 'master' into account
louisinger a0e40ef
dispatch UPDATE_TASK for current network after each LOGIN
louisinger e5bfcd5
update yarn.lock
louisinger 20b3db3
prettier
louisinger eb075a5
merge master
bordalix c329f00
replace gRPC by REST on taxi
bordalix e25e363
taxi assets by network
louisinger 445458a
error handling fix in choose-fee view
louisinger 09484bd
Merge branch 'account_with_taxi_rest' into account
louisinger 33c3c6f
update taxi at login
louisinger 93eda2a
fix taxi assets selector (by network)
louisinger 6cc2110
prettier
louisinger d667cbc
Promise.resolve
louisinger 4527bcd
Fix bug where periodic updaters were lost after extension update.
bordalix e3b1bc7
Coerce assetAmount and assetSpread into number.
bordalix ef78e90
yarn add ldk@0.4.3
bordalix f8bca88
bug fix: don't trust on browser default font size
bordalix 236c98d
Bug fix: clicking on asset and then on Receive would show a blank page
bordalix ff87eda
fixes bug where taxi transactions would throw an error since first in…
bordalix 88c5c41
fixes #100: In address-amount the back button should pop from the stack
bordalix 0549d7e
Merge branch 'account_with_taxi_fixed' into account
bordalix e6a6ff9
comments inputBlindingDataMap function
louisinger 6007a98
prettier
bordalix 1470f4e
adds radix to parseInt
bordalix 94cfdc5
coerce with Number
bordalix 4d1728c
merge master
bordalix 0b110fd
fix merge error
bordalix 34b972f
remove not used constant
bordalix 745b9b7
prettier
bordalix File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,26 @@ | ||
import { initialRestorerOpts, MnemonicAccountData } from '../../domain/account'; | ||
import { PasswordHash } from '../../domain/password-hash'; | ||
|
||
export const testPasswordHash: PasswordHash = | ||
'8314b7cd43641c00d3389128fe0d8ff2c286d5bb42313fe88da1d6c88a60f48e'; | ||
|
||
/** | ||
* test wallet data using to skip the onboarding step for Cypress. | ||
* data: | ||
* | mnemonic = "gas muscle wonder talk sand length swap immense critic opera tree fatigue" | ||
* | pwd = marinatest | ||
*/ | ||
export const testWalletData = { | ||
restorerOpts: {}, | ||
export const testWalletData: MnemonicAccountData = { | ||
restorerOpts: { | ||
liquid: initialRestorerOpts, | ||
testnet: initialRestorerOpts, | ||
regtest: initialRestorerOpts, | ||
}, | ||
encryptedMnemonic: | ||
'f343ad95c7be4b07b213ea489d6135b3fb7d659dfb4c9dc2ee9c9e7202100043b5fba308dd2f5d23cd3061452b644653b7c33d79704261feaefd220e9ef9a39784d593bb887f484dccd85b1eb7d53aba', | ||
masterXPub: | ||
'vpub5SLqN2bLY4WeYFQ5AFRZPCrhemcgnMPFCcM3L4aepayNa38B7xfjtfan5mNJevzBuUWA98y1CWab2L8dpefgywg3D7dvuNtY1X9UjUKgHvC', | ||
masterBlindingKey: 'd4422429e8f06ba093524b31b0ef6d69e2d26e0dd87fade4ab5c875fba2e85d1', | ||
passwordHash: '8314b7cd43641c00d3389128fe0d8ff2c286d5bb42313fe88da1d6c88a60f48e', | ||
confidentialAddresses: [], | ||
}; | ||
|
||
export const testAppURL = 'https://vulpemventures.github.io/marina-api-test-app/'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { NetworkString } from 'ldk'; | ||
import { AccountID } from '../../../domain/account'; | ||
import { ActionWithPayload } from '../../../domain/common'; | ||
import { UPDATE_TASK } from './action-types'; | ||
|
||
export type UpdateTaskAction = ActionWithPayload<{ accountID: AccountID; network: NetworkString }>; | ||
|
||
export const updateTaskAction = ( | ||
accountID: AccountID, | ||
network: NetworkString | ||
): UpdateTaskAction => ({ | ||
type: UPDATE_TASK, | ||
payload: { accountID, network }, | ||
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,32 @@ | ||
import { UnblindedOutput } from 'ldk'; | ||
import { NetworkString, UnblindedOutput } from 'ldk'; | ||
import { AnyAction } from 'redux'; | ||
import { ADD_UTXO, DELETE_UTXO, FLUSH_UTXOS, UPDATE_UTXOS } from './action-types'; | ||
import { AccountID } from '../../../domain/account'; | ||
import { ActionWithPayload } from '../../../domain/common'; | ||
import { ADD_UTXO, DELETE_UTXO, FLUSH_UTXOS } from './action-types'; | ||
|
||
export function updateUtxos(): AnyAction { | ||
return { type: UPDATE_UTXOS }; | ||
} | ||
export type AddUtxoAction = ActionWithPayload<{ | ||
accountID: AccountID; | ||
utxo: UnblindedOutput; | ||
network: NetworkString; | ||
}>; | ||
|
||
export function addUtxo(utxo: UnblindedOutput): AnyAction { | ||
return { type: ADD_UTXO, payload: { utxo } }; | ||
export function addUtxo( | ||
accountID: AccountID, | ||
utxo: UnblindedOutput, | ||
network: NetworkString | ||
): AddUtxoAction { | ||
return { type: ADD_UTXO, payload: { accountID, utxo, network } }; | ||
} | ||
|
||
export function deleteUtxo(txid: string, vout: number): AnyAction { | ||
return { type: DELETE_UTXO, payload: { txid, vout } }; | ||
export function deleteUtxo( | ||
accountID: AccountID, | ||
txid: string, | ||
vout: number, | ||
network: NetworkString | ||
): AnyAction { | ||
return { type: DELETE_UTXO, payload: { txid, vout, accountID, network } }; | ||
} | ||
|
||
export function flushUtxos(): AnyAction { | ||
return { type: FLUSH_UTXOS }; | ||
export function flushUtxos(accountID: AccountID, network: NetworkString): AnyAction { | ||
return { type: FLUSH_UTXOS, payload: { accountID, network } }; | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.