Cleanup generic transaction results (#348)

This commit is contained in:
Jaco Greeff
2019-03-04 16:14:35 +01:00
committed by GitHub
parent ed1b718e91
commit 9974b27e52
5 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -21,7 +21,7 @@
},
"devDependencies": {
"@babel/core": "^7.3.4",
"@polkadot/dev": "^0.25.11",
"@polkadot/dev": "^0.25.12",
"@polkadot/ts": "^0.1.55",
"gh-pages": "^2.0.1"
}
+1 -1
View File
@@ -26,7 +26,7 @@ export default class TransactionDb implements TxDb {
this.txStarted = false;
}
transaction<T = boolean> (fn: () => T): T {
transaction<T> (fn: () => T): T {
l.debug(() => ['transaction']);
try {
+1 -1
View File
@@ -34,5 +34,5 @@ export interface BaseDb {
}
export interface TxDb extends BaseDb {
transaction (fn: () => boolean): boolean;
transaction <T> (fn: () => T): T;
}
+1 -1
View File
@@ -31,7 +31,7 @@ export default class Trie extends Impl implements TrieDb {
l.log(`Created with ${this.codec.type} codec, root ${u8aToHex(this.rootHash, 64)}`);
}
transaction (fn: () => boolean): boolean {
transaction<T> (fn: () => T): T {
try {
this.createCheckpoint();
+4 -4
View File
@@ -1393,10 +1393,10 @@
universal-user-agent "^2.0.0"
url-template "^2.0.8"
"@polkadot/dev@^0.25.11":
version "0.25.11"
resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.25.11.tgz#73235add1eb0c86257ed8f1ab60e213be79a93f1"
integrity sha512-Fs9VFlwwZVKtk+J9kjNG0lWDpTYvcVXOksMXJ1lQLnf2YhqFILsq8kETfoXWbDbusgcok69hoA4YcNtwiEAGWg==
"@polkadot/dev@^0.25.12":
version "0.25.12"
resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.25.12.tgz#de440a96dba3c9b4a92e6be0f0276b8c1f4daf24"
integrity sha512-pISn6l4+brHCE04jjqSc7j7V63QmuhFykJFV2WejZHvUtKzBJa35C1ps+U9iKfa5Ma2gFyjyvlQOOvAKRwuKrA==
dependencies:
"@babel/cli" "^7.2.3"
"@babel/core" "^7.3.4"