import createWatcherSaga, { TakeType } from './create-watcher-saga.js';
// Act on every counter increment
const watchIncrementSaga = createWatcherSaga({ takeType: TakeType.every }, incrementSaga, 'counter/increment');
// Discard previous user fetches and act only on the latest
const watchFetchUser = createWatcherSaga({ takeType: TakeType.latest }, fetchUserSaga, 'user/fetch');
// Validate sign-up e-mail while the user is typing, but wait the user to have stopped typing for 2 seconds to not flood the server.
This code doesn't quite work. There is an issue with the Immer proxy being revoked.
I didn't have the time to dig into this, so the solution was to not use produce
in createStateMachineReducer
.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"constant": false, | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "usr", | |
"type": "address" | |
} | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState, useCallback } from 'react'; | |
import t from 'prop-types'; | |
import clsx from 'clsx'; | |
import { makeStyles } from '@material-ui/core/styles'; | |
import Button from '@material-ui/core/Button'; | |
import Input from '@material-ui/core/Input'; | |
import FormHelperText from '@material-ui/core/FormHelperText'; | |
import AttachmentIcon from '@material-ui/icons/Attachment'; | |
import { toMegaBytes } from '../../format'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ethers } from "@nomiclabs/buidler"; | |
import { task, usePlugin, BuidlerConfig } from "@nomiclabs/buidler/config"; | |
import { getWallets, defaultAccounts } from "ethereum-waffle"; | |
usePlugin("@nomiclabs/buidler-ethers"); | |
task("accounts", "Prints the list of accounts", async (taskArgs, env) => { | |
const accounts = await getWallets(ethers.provider); | |
for (const account of accounts) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) How and where do you like to work? | |
I currently live in São Paulo, Brazil. I am open to moving to Lisbon, but it could take a while, so for now I'd choose to work remotely. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"constant": false, | |
"inputs": [ | |
{ | |
"name": "_pinakion", | |
"type": "address" | |
} | |
], | |
"name": "changePinakion", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const cuid = require('cuid'); | |
const createLogger = require('./logger.js'); | |
const PORT = Number(process.env.PORT) || 8080; | |
function clsRequestId(namespace, generateId) { | |
return (req, res, next) => { | |
const requestId = req.get('X-Request-Id') || generateId(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/logger.js b/logger.js | |
index d19e435..decb76b 100644 | |
--- a/logger.js | |
+++ b/logger.js | |
@@ -1,8 +1,6 @@ | |
const pino = require('pino'); | |
const { createNamespace } = require('cls-hooked'); | |
-const logMethods = ['trace', 'debug', 'info', 'warn', 'error', 'fatal']; | |
- |