@instadapp/avocado-base 0.0.52 → 0.0.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -28,7 +28,7 @@ const isTokensSame = computed(() => {
|
|
|
28
28
|
|
|
29
29
|
const bridgeAmountFormatted = computed(() =>
|
|
30
30
|
formatDecimal(
|
|
31
|
-
fromWei(props.metadata?.amount,
|
|
31
|
+
fromWei(props.metadata?.amount, fromToken?.value?.decimals).toFixed()
|
|
32
32
|
)
|
|
33
33
|
);
|
|
34
34
|
</script>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instadapp/avocado-base",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.55",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./nuxt.config.ts",
|
|
6
6
|
"types": "global.d.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@vueuse/nuxt": "^10.2.0",
|
|
28
28
|
"bignumber.js": "^9.1.1",
|
|
29
|
-
"
|
|
30
|
-
"
|
|
29
|
+
"ethers": "^5.7.2",
|
|
30
|
+
"xxhashjs": "^0.2.2"
|
|
31
31
|
}
|
|
32
32
|
}
|
package/utils/helper.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as XXH from 'xxhashjs';
|
|
2
2
|
|
|
3
3
|
export const indexSorter = (aIndex: number, bIndex: number) => {
|
|
4
4
|
if (aIndex === -1 && bIndex === -1) {
|
|
@@ -62,12 +62,12 @@ export function formatMultipleAddresses(addresses: string[], shorten = true) {
|
|
|
62
62
|
return formattedString
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
export function generateColor(address: string) {
|
|
66
|
-
const hash =
|
|
65
|
+
export function generateColor(address: string): string {
|
|
66
|
+
const hash = XXH.h32(address, 0xABCD).toNumber()
|
|
67
67
|
|
|
68
|
-
const hue = hash % 360
|
|
69
|
-
const saturation = 80 + (hash % 30)
|
|
70
|
-
const lightness = 70 + (hash % 20)
|
|
68
|
+
const hue = hash % 360
|
|
69
|
+
const saturation = 80 + (hash % 30)
|
|
70
|
+
const lightness = 70 + (hash % 20)
|
|
71
71
|
|
|
72
|
-
return `hsl(${hue}, ${saturation}%, ${lightness}%)
|
|
72
|
+
return `hsl(${hue}, ${saturation}%, ${lightness}%)`
|
|
73
73
|
}
|