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
type EdgeTxAsset = { | |
pluginId: string, | |
tokenId: string, | |
nativeAmount: string, | |
} | |
type EdgeTxInfoSwap = { | |
type: 'swap' | 'swapOrder' | 'swapOrderFulfill', | |
orderId?: string, | |
direction: 'from' | 'to', |
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
class KeyTool { | |
static deriveViewKey (seedBytesHex: string): string | |
static deriveSpendingKey: (seedBytesHex: string): string | |
} | |
class AddressTool { | |
static deriveShieldedAddress (viewingKey: string): string | |
static deriveTransparentAddress (viewingKey: string): string | |
static isValidShieldedAddress (address: string): boolean | |
static isValidTransparentAddress (address: string): boolean | |
} |
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
This is a proposed architecture for the commonly used, and frequently buggy, FlipInput and ExchangeFlipInput component. | |
## FlipInput | |
FlipInput component is not to access any redux state and all state is to be contained inside component. This will be a non-connected component. FlipInput will know nothing about nativeAmounts. All amounts going into and out of FlipInput are floatingpoint big numbers in US locale decimal format with no 1000s separator and are agnostic of native vs currency vs display amounts. All values are “decimal” values. Internally, FlipInput will display locale fixed `displayAmounts` which will have 1000s separators and decimal points added. For nomenclature, `displayAmounts` will refer to values with localized amounts in string format with 1000s separator. `decimalAmounts` will refer to en_US decimal format amounts with no 1000s separator and a `.` as the decimal point. Note that the FlipInput no longer returns both the primary and secondary values when they change nor does it notify whe |