@swype-org/react-sdk 0.1.168 → 0.1.172
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.
- package/dist/index.cjs +25 -32
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +25 -32
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2176,38 +2176,28 @@ function svgToDataUri(svg) {
|
|
|
2176
2176
|
var BASE_SVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 111 111" fill="none">
|
|
2177
2177
|
<path d="M54.921 110.034C85.359 110.034 110.034 85.402 110.034 55.017C110.034 24.6319 85.359 0 54.921 0C26.0432 0 2.35281 22.1714 0 50.3923H72.8467V59.6416H0C2.35281 87.8625 26.0432 110.034 54.921 110.034Z" fill="#0052FF"/>
|
|
2178
2178
|
</svg>`;
|
|
2179
|
-
var METAMASK_SVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0
|
|
2180
|
-
<
|
|
2181
|
-
<
|
|
2182
|
-
<
|
|
2183
|
-
<
|
|
2184
|
-
<
|
|
2185
|
-
<
|
|
2186
|
-
<
|
|
2187
|
-
<polygon fill="#CD6116" stroke="#CD6116" stroke-linecap="round" stroke-linejoin="round" points="177.9,230.9 211.8,247.4 207.1,208.1"/>
|
|
2188
|
-
<polygon fill="#E4761B" stroke="#E4761B" stroke-linecap="round" stroke-linejoin="round" points="211.8,247.4 177.9,230.9 180.6,253 180.3,262.3"/>
|
|
2189
|
-
<polygon fill="#E4761B" stroke="#E4761B" stroke-linecap="round" stroke-linejoin="round" points="107.8,247.4 138.3,262.3 138.1,253 140.6,230.9"/>
|
|
2190
|
-
<polygon fill="#763D16" stroke="#763D16" stroke-linecap="round" stroke-linejoin="round" points="138.8,193.5 110.6,185.2 130.5,176.1"/>
|
|
2191
|
-
<polygon fill="#763D16" stroke="#763D16" stroke-linecap="round" stroke-linejoin="round" points="179.7,193.5 188,176.1 208,185.2"/>
|
|
2192
|
-
<polygon fill="#F6851B" stroke="#F6851B" stroke-linecap="round" stroke-linejoin="round" points="107.8,247.4 111.6,206.8 81.3,207.7"/>
|
|
2193
|
-
<polygon fill="#F6851B" stroke="#F6851B" stroke-linecap="round" stroke-linejoin="round" points="207,206.8 211.8,247.4 238.3,207.7"/>
|
|
2194
|
-
<polygon fill="#F6851B" stroke="#F6851B" stroke-linecap="round" stroke-linejoin="round" points="230.8,162.1 174.6,164.6 179.8,193.5 188.1,176.1 208.1,185.2"/>
|
|
2195
|
-
<polygon fill="#F6851B" stroke="#F6851B" stroke-linecap="round" stroke-linejoin="round" points="110.6,185.2 130.6,176.1 138.8,193.5 143.1,164.6 87.8,162.1"/>
|
|
2196
|
-
<polygon fill="#E4751F" stroke="#E4751F" stroke-linecap="round" stroke-linejoin="round" points="87.8,162.1 111.4,208.1 110.6,185.2"/>
|
|
2197
|
-
<polygon fill="#E4751F" stroke="#E4751F" stroke-linecap="round" stroke-linejoin="round" points="208.1,185.2 207.1,208.1 230.8,162.1"/>
|
|
2198
|
-
<polygon fill="#E4751F" stroke="#E4751F" stroke-linecap="round" stroke-linejoin="round" points="143.1,164.6 138.8,193.5 144.1,218.9 145.3,182.8"/>
|
|
2199
|
-
<polygon fill="#E4751F" stroke="#E4751F" stroke-linecap="round" stroke-linejoin="round" points="174.6,164.6 173.1,182.6 174.4,218.9 179.8,193.5"/>
|
|
2200
|
-
<polygon fill="#F6851B" stroke="#F6851B" stroke-linecap="round" stroke-linejoin="round" points="179.8,193.5 174.4,218.9 177.9,230.9 207.1,208.1 208.1,185.2"/>
|
|
2201
|
-
<polygon fill="#F6851B" stroke="#F6851B" stroke-linecap="round" stroke-linejoin="round" points="110.6,185.2 111.4,208.1 140.6,230.9 144.1,218.9 138.8,193.5"/>
|
|
2202
|
-
<polygon fill="#C0AD9E" stroke="#C0AD9E" stroke-linecap="round" stroke-linejoin="round" points="180.3,262.3 180.6,253 178.1,250.8 140.4,250.8 138.1,253 138.3,262.3 107.8,247.4 117.8,255.1 140.1,271.9 178.4,271.9 200.8,255.1 211.8,247.4"/>
|
|
2203
|
-
<polygon fill="#161616" stroke="#161616" stroke-linecap="round" stroke-linejoin="round" points="177.9,230.9 174.4,218.9 178.1,250.8 180.6,253"/>
|
|
2204
|
-
<polygon fill="#161616" stroke="#161616" stroke-linecap="round" stroke-linejoin="round" points="140.6,230.9 138.1,253 140.4,250.8 144.1,218.9"/>
|
|
2205
|
-
<polygon fill="#763D16" stroke="#763D16" stroke-linecap="round" stroke-linejoin="round" points="278.3,114.2 286.8,73.7 274.1,35.5 174.6,109.4 214.9,138.2 267.2,153.5 278.8,140 273.8,136.4 281.8,129.1 275.4,124.1 283.4,118"/>
|
|
2206
|
-
<polygon fill="#763D16" stroke="#763D16" stroke-linecap="round" stroke-linejoin="round" points="31.8,73.7 40.3,114.2 35.5,118 43.5,124.1 36.8,129.1 44.8,136.4 39.8,140 51.3,153.5 103.6,138.2 143.1,110.1 44.4,35.5"/>
|
|
2179
|
+
var METAMASK_SVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 142 136.878">
|
|
2180
|
+
<path fill="#FF5C16" d="M132.682,132.192l-30.583-9.106l-23.063,13.787l-16.092-0.007l-23.077-13.78l-30.569,9.106L0,100.801l9.299-34.839L0,36.507L9.299,0l47.766,28.538h27.85L132.682,0l9.299,36.507l-9.299,29.455l9.299,34.839L132.682,132.192L132.682,132.192z"/>
|
|
2181
|
+
<path fill="#FF5C16" d="M9.305,0l47.767,28.558l-1.899,19.599L9.305,0z M39.875,100.814l21.017,16.01l-21.017,6.261C39.875,123.085,39.875,100.814,39.875,100.814z M59.212,74.345l-4.039-26.174L29.317,65.97l-0.014-0.007v0.013l0.08,18.321l10.485-9.951L59.212,74.345L59.212,74.345z M132.682,0L84.915,28.558l1.893,19.599L132.682,0z M102.113,100.814l-21.018,16.01l21.018,6.261V100.814z M112.678,65.975h0.007H112.678v-0.013l-0.006,0.007L86.815,48.171l-4.039,26.174h19.336l10.492,9.95C112.604,84.295,112.678,65.975,112.678,65.975z"/>
|
|
2182
|
+
<path fill="#E34807" d="M39.868,123.085l-30.569,9.106L0,100.814h39.868C39.868,100.814,39.868,123.085,39.868,123.085z M59.205,74.338l5.839,37.84l-8.093-21.04L29.37,84.295l10.491-9.956h19.344L59.205,74.338z M102.112,123.085l30.57,9.106l9.299-31.378h-39.869C102.112,100.814,102.112,123.085,102.112,123.085z M82.776,74.338l-5.839,37.84l8.092-21.04l27.583-6.843l-10.498-9.956H82.776V74.338z"/>
|
|
2183
|
+
<path fill="#FF8D5D" d="M0,100.801l9.299-34.839h19.997l0.073,18.327l27.584,6.843l8.092,21.039l-4.16,4.633l-21.017-16.01H0V100.801z M141.981,100.801l-9.299-34.839h-19.998l-0.073,18.327l-27.582,6.843l-8.093,21.039l4.159,4.633l21.018-16.01h39.868V100.801z M84.915,28.538h-27.85l-1.891,19.599l9.872,64.013h11.891l9.878-64.013L84.915,28.538z"/>
|
|
2184
|
+
<path fill="#661800" d="M9.299,0L0,36.507l9.299,29.455h19.997l25.87-17.804L9.299,0z M53.426,81.938h-9.059l-4.932,4.835l17.524,4.344l-3.533-9.186V81.938z M132.682,0l9.299,36.507l-9.299,29.455h-19.998L86.815,48.158L132.682,0z M88.568,81.938h9.072l4.932,4.841l-17.544,4.353l3.54-9.201V81.938z M79.029,124.385l2.067-7.567l-4.16-4.633h-11.9l-4.159,4.633l2.066,7.567"/>
|
|
2185
|
+
<path fill="#C0C4CD" d="M79.029,124.384v12.495H62.945v-12.495L79.029,124.384L79.029,124.384z"/>
|
|
2186
|
+
<path fill="#E7EBF6" d="M39.875,123.072l23.083,13.8v-12.495l-2.067-7.566C60.891,116.811,39.875,123.072,39.875,123.072z M102.113,123.072l-23.084,13.8v-12.495l2.067-7.566C81.096,116.811,102.113,123.072,102.113,123.072z"/>
|
|
2207
2187
|
</svg>`;
|
|
2208
|
-
var TRUST_WALLET_SVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="
|
|
2209
|
-
<
|
|
2210
|
-
<
|
|
2188
|
+
var TRUST_WALLET_SVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="729 341 463 521">
|
|
2189
|
+
<defs>
|
|
2190
|
+
<linearGradient id="tw-grad" x1="1123.26" y1="1865.78" x2="954.61" y2="1337.5" gradientTransform="translate(0 2182) scale(1 -1)" gradientUnits="userSpaceOnUse">
|
|
2191
|
+
<stop offset=".02" stop-color="blue"/>
|
|
2192
|
+
<stop offset=".08" stop-color="#0094ff"/>
|
|
2193
|
+
<stop offset=".16" stop-color="#48ff91"/>
|
|
2194
|
+
<stop offset=".42" stop-color="#0094ff"/>
|
|
2195
|
+
<stop offset=".68" stop-color="#0038ff"/>
|
|
2196
|
+
<stop offset=".9" stop-color="#0500ff"/>
|
|
2197
|
+
</linearGradient>
|
|
2198
|
+
</defs>
|
|
2199
|
+
<path fill="#0500ff" d="m738.71,423.41l221.45-72.3v500.52c-158.18-66.74-221.45-194.65-221.45-266.94v-161.28Z"/>
|
|
2200
|
+
<path fill="url(#tw-grad)" d="m1181.62,423.41l-221.45-72.3v500.52c158.18-66.74,221.45-194.65,221.45-266.94v-161.28Z"/>
|
|
2211
2201
|
</svg>`;
|
|
2212
2202
|
var SWYPE_SVG = `<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2213
2203
|
<g clip-path="url(#clip0_125_480)">
|
|
@@ -5285,6 +5275,7 @@ function TokenPickerScreen({
|
|
|
5285
5275
|
const entries = [];
|
|
5286
5276
|
for (const wallet of account.wallets) {
|
|
5287
5277
|
for (const source of wallet.sources) {
|
|
5278
|
+
if (source.balance.total.amount <= 0) continue;
|
|
5288
5279
|
entries.push({
|
|
5289
5280
|
walletId: wallet.id,
|
|
5290
5281
|
chainName: wallet.chain.name,
|
|
@@ -5944,7 +5935,9 @@ function useDerivedState(state) {
|
|
|
5944
5935
|
let count = 0;
|
|
5945
5936
|
for (const acct of state.accounts) {
|
|
5946
5937
|
for (const wallet of acct.wallets) {
|
|
5947
|
-
count += wallet.sources.
|
|
5938
|
+
count += wallet.sources.filter(
|
|
5939
|
+
(s) => s.balance.available.amount > 0
|
|
5940
|
+
).length;
|
|
5948
5941
|
}
|
|
5949
5942
|
}
|
|
5950
5943
|
return count;
|