@@ -4,7 +4,7 @@
5import { BRIDGE_ERROR } from '../lib/error'
5import { BRIDGE_ERROR } from '../lib/error'
7−function needWeb3(obj) {
7+function web3(obj) {
8 return ('web3' in obj === false)
8 return ('web3' in obj === false)
9 ? (() => { throw BRIDGE_ERROR.MISSING_WEB3 })()
9 ? (() => { throw BRIDGE_ERROR.MISSING_WEB3 })()
10 : obj.web3.matchWith({
10 : obj.web3.matchWith({
@@ -13,7 +13,7 @@ function needWeb3(obj) {
16−function needContracts(obj) {
16+function contracts(obj) {
17 return ('contracts' in obj === false)
17 return ('contracts' in obj === false)
18 ? (() => { throw BRIDGE_ERROR.MISSING_CONTRACTS })()
18 ? (() => { throw BRIDGE_ERROR.MISSING_CONTRACTS })()
19 : obj.contracts.matchWith({
19 : obj.contracts.matchWith({
@@ -22,7 +22,7 @@ function needContracts(obj) {
25−function needWallet(obj) {
25+function wallet(obj) {
26 return ('wallet' in obj === false)
26 return ('wallet' in obj === false)
27 ? (() => { throw BRIDGE_ERROR.MISSING_WALLET })()
27 ? (() => { throw BRIDGE_ERROR.MISSING_WALLET })()
28 : obj.wallet.matchWith({
28 : obj.wallet.matchWith({
@@ -31,11 +31,11 @@ function needWallet(obj) {
34−function needAddress(obj) {
34+function address(obj) {
35− return needWallet(obj).address;
35+ return wallet(obj).address;
38−function needPointCursor(obj) {
38+function pointCursor(obj) {
39 return ('pointCursor' in obj === false)
39 return ('pointCursor' in obj === false)
40 ? (() => { throw BRIDGE_ERROR.MISSING_POINT })()
40 ? (() => { throw BRIDGE_ERROR.MISSING_POINT })()
41 : obj.pointCursor.matchWith({
41 : obj.pointCursor.matchWith({
@@ -44,7 +44,7 @@ function needPointCursor(obj) {
47−function needFromPointCache(obj, point) {
47+function fromPointCache(obj, point) {
48 return ('pointCache' in obj === false)
48 return ('pointCache' in obj === false)
49 ? (() => { throw BRIDGE_ERROR.MISSING_POINT })()
49 ? (() => { throw BRIDGE_ERROR.MISSING_POINT })()
50 : point in obj.pointCache
50 : point in obj.pointCache
@@ -53,10 +53,10 @@ function needFromPointCache(obj, point) {
57− needContracts,
57+ contracts,
58− needWallet,
58+ wallet,
59− needAddress,
59+ address,
60− needPointCursor,
60+ pointCursor,
61− needFromPointCache
61+ fromPointCache