I hereby claim:
- I am paullaux on github.
- I am paullaux (https://keybase.io/paullaux) on keybase.
- I have a public key ASAHyAhakY5YMJLfVmp_MS443UO7RTnHkIDDcYIQiVqjxgo
To claim this, I am signing this object:
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH="/home/px1/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
# This installs alacritty terminal on ubuntu (https://github.com/jwilm/alacritty) | |
# You have to have rust/cargo installed for this to work | |
# Install required tools | |
sudo apt-get install -y cmake libfreetype6-dev libfontconfig1-dev xclip | |
# Download, compile and install Alacritty | |
git clone https://github.com/jwilm/alacritty |
export default function* defaultSaga() { | |
// ... | |
// The polling will start only after the first CHECK_BALANCES ends | |
yield [ | |
fork(watchPollData), | |
takeLatest(CHECK_BALANCES, checkAllBalances), | |
]; | |
} | |
// Start Polling when first call to checkAllBalances succeded or fails |
function* commitEthSendAsync() { | |
try { | |
const web3 = yield select(makeSelectWeb3()); | |
// ... | |
contractInstance.methods.commit().send({ | |
from: defaultAccount, | |
gasPrice, | |
value: web3.utils.toWei(amount.toString(), 'ether'), | |
}).once('transactionHash', (tx) => { | |
transactionChannel.put({ |
import { channel } from 'redux-saga'; | |
const transactionChannel = channel(); | |
/* Init Dapp */ | |
function* initDappAsync(action) { | |
// ... | |
// fork to handle channel events | |
yield fork(handleChannelEvents); | |
} |
// full source: https://github.com/PaulLaux/eth-hot-wallet/blob/master/app/containers/Header/saga.js#L203 | |
export function* SendTransaction() { | |
try { | |
// ... | |
const contractAddress = tokenInfo.contractAddress; | |
const sendParams = { from: fromAddress, value: '0x0', gasPrice, gas: maxGasForTokenSend }; | |
const tokenAmount = amount * (10 ** tokenInfo.decimals); | |
function sendTokenPromise(tokenContractAddress, sendToAddress, sendAmount, params) { | |
return new Promise((resolve, reject) => { |
// Automatically determines the use of call or sendTransaction based on the method type | |
myContractInstance.myMethod(param1 [, ...][, callback]); | |
// Explicitly calling this method - simulate execution and return result | |
// No cost, no actual transaction is sent to the blockchain | |
myContractInstance.myMethod.call(param1 [, ...] [, callback]); | |
// Explicitly sending a transaction to this method | |
myContractInstance.myMethod.sendTransaction(param1 [, ...] [, callback]); | |
// https://github.com/PaulLaux/eth-hot-wallet/blob/master/app/containers/Header/saga.js#L203 | |
export function* SendTransaction() { | |
try { | |
// ... | |
let tx; | |
const sendAmount = new BigNumber(amount).times(Ether); | |
const sendParams = { from: fromAddress, to: toAddress, value: sendAmount, gasPrice, gas: maxGasForEthSend }; | |
function sendTransactionPromise(params) { | |
return new Promise((resolve, reject) => { |
import localStore from 'store/dist/store.modern'; | |
/* keystore will be saved to local storage under this key */ | |
export const localStorageKey = 'ks'; | |
/** | |
* Save wallet to localStorage | |
*/ | |
export function* saveWalletS() { | |
try { |