This file contains hidden or 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, { Component, PropTypes } from 'React'; | |
| export const Enhance = ComposedComponent => { | |
| class WrappedComponent extends Component { | |
| attachFunction() { | |
| ComposedComponent.attachFunction(); | |
| } | |
| render() { | |
| return <ComposedComponent {...this.props} additionalProps={this.state.additionalData} />; | |
| } |
This file contains hidden or 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
| var upperFirst = formatter( function formatting(v){ | |
| return v[0].toUpperCase() + v.substr( 1 ).toLowerCase(); | |
| } ); |
This file contains hidden or 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
| /* | |
| * register IDepA with no dependencies | |
| */ | |
| @Register('IDepA', []) | |
| class ConcreteA implements IDepA { | |
| doA(): void { | |
| console.log('Doing A'); | |
| } | |
| } |
This file contains hidden or 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
| // sign a message with a wallet private key and validate its signature | |
| // https://github.com/0xC0A1/web3-auth/tree/master | |
| import { useEffect } from "react"; | |
| import b58 from "bs58"; | |
| import nacl from "tweetnacl"; | |
| import { PublicKey } from "@solana/web3.js"; | |
| import { useWallet } from "@solana/wallet-adapter-react"; | |
| export const Sign = () => { |