Handle storage with optional modifiers (#717)

* Handle storage with optional modifiers

* Storage docs indicate Option

* Cleanup Option logic

* Convert Optional derive to use Option

* Bump version, update changelog

* Update CHANGELOG description

* Enum.spec.js -> Enum.spec.ts

* Add isEmpty to primitive types
This commit is contained in:
Jaco Greeff
2019-02-19 13:47:36 +01:00
committed by GitHub
parent 4f17047c77
commit f807a93e87
40 changed files with 259 additions and 96 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/storage",
"version": "0.44.1",
"version": "0.45.0",
"description": "Generic wrapper wrapper around state storage",
"main": "index.js",
"engines": {
@@ -31,7 +31,7 @@
"dependencies": {
"@babel/runtime": "^7.3.1",
"@polkadot/keyring": "^0.34.20",
"@polkadot/types": "^0.44.1",
"@polkadot/types": "^0.45.0",
"@polkadot/util": "^0.34.20",
"@polkadot/util-crypto": "^0.34.20"
}
+1 -1
View File
@@ -20,7 +20,7 @@ const createRuntimeFunction = (method: string, key: string, { documentation, typ
new Text(method),
{
documentation: new Vector(Text, [documentation]),
modifier: new StorageFunctionModifier(0),
modifier: new StorageFunctionModifier(1), // default
type: new StorageFunctionType(type, 0),
toJSON: (): any =>
key