Skip to content

Commit

Permalink
feat(remote serialization and deserialization compliant with redux de…
Browse files Browse the repository at this point in the history
…v tools)
  • Loading branch information
sixtedemaupeou committed Jun 20, 2018
1 parent 707fcb8 commit 27ffdc1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/blockchain-wallet-v4/src/remote/index.js
Expand Up @@ -37,7 +37,7 @@ Remote.prototype.ap = function (that) {
}

Remote.prototype.toJSON = function () {
return { data: this['@@values'][0] || [], __serializedType__: this['@@tag'] }
return { data: { __remote: this['@@values'][0] || [] }, __serializedType__: this['@@tag'] }
}

Remote.prototype.chain = function (f) {
Expand Down
4 changes: 2 additions & 2 deletions packages/blockchain-wallet-v4/src/types/Serializer.js
Expand Up @@ -39,8 +39,8 @@ const serializer = {
case 'TXNames': return TXNames.reviver(data)
case 'Options': return Options.reviver(data)
case 'KVStoreEntry': return KVStoreEntry.reviver(data)
case 'Success': return Remote.Success(data)
case 'Failure': return Remote.Failure(data)
case 'Success': return Remote.Success(data.__remote)
case 'Failure': return Remote.Failure(data.__remote)
case 'Loading': return Remote.Loading
case 'NotAsked': return Remote.NotAsked
default: return data
Expand Down

0 comments on commit 27ffdc1

Please sign in to comment.