immutable#RecordOf TypeScript Examples
The following examples show how to use
immutable#RecordOf.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: index.tsx From multisig-react with MIT License | 6 votes |
useTxData = (
isSendingNativeToken: boolean,
txAmount: string,
recipientAddress: string,
txToken?: RecordOf<TokenProps>,
): string => {
const [data, setData] = useState('')
useEffect(() => {
const updateTxDataAsync = async () => {
if (!txToken) {
return
}
let txData = EMPTY_DATA
if (!isSendingNativeToken) {
const StandardToken = await getHumanFriendlyToken()
const tokenInstance = await StandardToken.at(txToken.address as string)
const erc20TransferAmount = toTokenUnit(txAmount, txToken.decimals)
txData = tokenInstance.contract.methods.transfer(recipientAddress, erc20TransferAmount).encodeABI()
}
setData(txData)
}
updateTxDataAsync()
}, [isSendingNativeToken, recipientAddress, txAmount, txToken])
return data
}
Example #2
Source File: widget-manager.ts From outputs with BSD 3-Clause "New" or "Revised" License | 5 votes |
kernel:
| RecordOf<KernelNotStartedProps>
| RecordOf<LocalKernelProps>
| RecordOf<RemoteKernelProps>
| null;