From 149829a69b035f9d64025e3c81904f50b0b91dac Mon Sep 17 00:00:00 2001 From: Ashwin Phatak Date: Tue, 26 May 2020 15:34:25 +0530 Subject: [PATCH] Get WNS logs using API. --- packages/console-client/package.json | 2 +- packages/console-client/src/resolvers.js | 5 +++-- yarn.lock | 14 ++++++++++---- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/packages/console-client/package.json b/packages/console-client/package.json index 842f547..0b8ef00 100644 --- a/packages/console-client/package.json +++ b/packages/console-client/package.json @@ -35,7 +35,7 @@ "@material-ui/core": "^4.10.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "^4.0.0-alpha.54", - "@wirelineio/registry-client": "^0.4.8", + "@wirelineio/registry-client": "^0.4.9", "apollo-cache-inmemory": "^1.6.6", "apollo-client": "^2.6.10", "apollo-link-http": "^1.5.17", diff --git a/packages/console-client/src/resolvers.js b/packages/console-client/src/resolvers.js index 841a9ff..8b6efe3 100644 --- a/packages/console-client/src/resolvers.js +++ b/packages/console-client/src/resolvers.js @@ -52,11 +52,12 @@ export const createResolvers = config => { wns_log: async () => { log('WNS log...'); - // TODO(burdon): Use Registry API rather than from CLI? + const data = await registry.getLogs(); + return { __typename: 'JSONLog', timestamp: timestamp(), - log: [] + log: data }; } } diff --git a/yarn.lock b/yarn.lock index 4c25b90..e635012 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3267,12 +3267,13 @@ "@webassemblyjs/wast-parser" "1.9.0" "@xtuc/long" "4.2.2" -"@wirelineio/registry-client@^0.4.8": - version "0.4.8" - resolved "https://registry.yarnpkg.com/@wirelineio/registry-client/-/registry-client-0.4.8.tgz#05baf614ed28c25daaa20335359955b0a153a509" - integrity sha512-kxf4Zj3dr+q+dW++N2TUAZz7h7LLE/8RU31c7mUEwy9ZbZXXPcAF0voq8985FTCUmSc4Z5t9b77hvpFqFn5lLA== +"@wirelineio/registry-client@^0.4.9": + version "0.4.9" + resolved "https://registry.yarnpkg.com/@wirelineio/registry-client/-/registry-client-0.4.9.tgz#8e0166c67d74d634294076cff73b7cff5cee40d8" + integrity sha512-n9oecUGU01+SUvdrB+/1LCbAQT+jiIG3pfZj+JLU4teou17ZxaEcMbzpFamWO2IVXZP0751y6Va42K4IFE7e9w== dependencies: "@babel/runtime" "^7.0.0" + "@wirelineio/wns-schema" "^0.1.0" bech32 "^1.1.3" bip32 "^2.0.5" bip39 "^2.5.0" @@ -3291,6 +3292,11 @@ ripemd160 "^2.0.2" secp256k1 "^3.6.2" +"@wirelineio/wns-schema@^0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@wirelineio/wns-schema/-/wns-schema-0.1.0.tgz#61afc98e0a3e89a5d4ad3ef1d84f50b199224356" + integrity sha512-MetSYFR7OS54hR2tGmFnzGeK5vwqJfBI2kZXmYHKcdj5EyJXheMg9XP3LUwVLVgRe7gOCoQqBstAYl1cL1FdHg== + "@wry/context@^0.4.0": version "0.4.4" resolved "https://registry.yarnpkg.com/@wry/context/-/context-0.4.4.tgz#e50f5fa1d6cfaabf2977d1fda5ae91717f8815f8"