Following instructions from the excellent https://www.rinkeby.io/
A full node lets you access all state. There is a light node (state-on-demand) and wallet-only (no state) instructions as well,
function promisifyFileReader (filereader) { | |
function composeAsync (key) { | |
return function () { | |
var args = arguments | |
return new Promise (function (resolve, reject) { | |
// | |
function resolveHandler () { | |
cleanHandlers() | |
resolve(filereader.result) | |
} |
function translateError(msg) { | |
var newErr = new Error(msg); // placed here to get correct stack | |
return e => { | |
newErr.originalError = e; | |
throw newErr; | |
} | |
} | |
async function asyncTask() { | |
const user = await UserModel.findById(1).catch(translateError('No user found')) |
import Vue from 'vue' | |
const mockComponent = function (name, props) { | |
return { | |
props: props, | |
render: function (createElement) { | |
return createElement(name, { props: props }) | |
} | |
} | |
} |
Following instructions from the excellent https://www.rinkeby.io/
A full node lets you access all state. There is a light node (state-on-demand) and wallet-only (no state) instructions as well,
Please see the upgrade guide at buzzard.docs.feathersjs.com/migrating.html
import { Dispatcher } from './store'; | |
export default Vue.component('some-component', { | |
template, | |
created() { | |
this.fetchData(); | |
}, | |
methods: { | |
/** | |
* Fetch our data. |
// place this file in __mocks__ | |
let pendingAssertions | |
exports.prompt = prompts => { | |
if (!pendingAssertions) { | |
throw new Error(`inquirer was mocked and used without pending assertions: ${prompts}`) | |
} | |
const answers = {} |
import { mapState } from 'vuex' | |
export default function mapStatesTwoWay (namespace, states, updateCb) { | |
const mappedStates = mapState(namespace, states) | |
const res = {} | |
for (const key in mappedStates) { | |
res[key] = { | |
set (value) { | |
updateCb.call(this, { [key]: value }) | |
}, |
let isAlreadyFetchingAccessToken = false | |
let subscribers = [] | |
function onAccessTokenFetched(access_token) { | |
subscribers = subscribers.filter(callback => callback(access_token)) | |
} | |
function addSubscriber(callback) { | |
subscribers.push(callback) | |
} |
# The name for this gist (starts with exclamation mark, because the name of the gist is the name of the first file in ASCIIbetical order) |