This repository has been archived by the owner on Jan 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1234 from gnosis/release/1.1.0
Release/1.1.0
- Loading branch information
Showing
114 changed files
with
8,645 additions
and
5,069 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
lts/erbium |
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 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 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 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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { DevTool } from '@hookform/devtools' |
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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { logDebug } from 'utils' | ||
|
||
// 0.1 Gwei, reasonable gasPrice that would still allow flags replacement | ||
export const MIN_GAS_PRICE = (1e8).toString(10) | ||
|
||
export const earmarkGasPrice = (gasPrice: string, userPrint: string): string => { | ||
if (!userPrint) return gasPrice | ||
|
||
// don't replace 8000 -> 1201, only if most significant digit is untouched | ||
// 80000 -> 81201 | ||
if (userPrint.length >= gasPrice.length) { | ||
// if flags still don't fit even in MIN_GAS_PRICE | ||
if (userPrint.length >= MIN_GAS_PRICE.length) return gasPrice | ||
gasPrice = MIN_GAS_PRICE | ||
} | ||
|
||
const markedGasPrice = gasPrice.slice(0, -userPrint.length) + userPrint | ||
|
||
logDebug('Gas price', gasPrice, '->', markedGasPrice) | ||
return markedGasPrice | ||
} | ||
|
||
// simple concatenation, with '0x' for empty data to have `0x<userPrint>` at the least | ||
export const earmarkTxData = (data = '0x', userPrint: string): string => data + userPrint |
Oops, something went wrong.