Skip to content

Commit cf58cab

Browse files
committed
Merge branch 'main' into chore/merge-updated-permit-flow
2 parents 837c5c1 + ede4c65 commit cf58cab

File tree

6 files changed

+66
-59
lines changed

6 files changed

+66
-59
lines changed

scripts/populate-cache.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75839,8 +75839,8 @@ var networkConfigs = {
7583975839
// src/utils/rotationProvider.ts
7584075840
var import_providers = __toESM(require_lib30());
7584175841
var import_ethers = __toESM(require_lib31());
75842-
var DEFAULT_ROTATION_DELAY = 5e3;
7584375842
var DEFAULT_FALL_FORWARD_DELAY = 6e4;
75843+
var MAX_RETRIES = 1;
7584475844
function sleep(ms) {
7584575845
return new Promise((resolve) => setTimeout(resolve, ms));
7584675846
}
@@ -75881,8 +75881,10 @@ var RotationProvider = class extends import_providers.BaseProvider {
7588175881
super(chainId);
7588275882
this.currentProviderIndex = 0;
7588375883
this.firstRotationTimestamp = 0;
75884+
this.maxRetries = 0;
75885+
this.retries = 0;
7588475886
this.providers = urls.map((url) => new import_providers.StaticJsonRpcProvider(url, chainId));
75885-
this.rotationDelay = (config == null ? void 0 : config.rotationDelay) || DEFAULT_ROTATION_DELAY;
75887+
this.maxRetries = (config == null ? void 0 : config.maxRetries) || MAX_RETRIES;
7588675888
this.fallForwardDelay =
7588775889
(config == null ? void 0 : config.fallFowardDelay) || DEFAULT_FALL_FORWARD_DELAY;
7588875890
}
@@ -75904,7 +75906,11 @@ var RotationProvider = class extends import_providers.BaseProvider {
7590475906
this.firstRotationTimestamp = new Date().getTime();
7590575907
this.fallForwardRotation();
7590675908
} else if (this.currentProviderIndex === this.providers.length - 1) {
75907-
yield sleep(this.rotationDelay);
75909+
this.retries += 1;
75910+
if (this.retries > this.maxRetries) {
75911+
this.retries = 0;
75912+
throw new Error('RotationProvider exceeded max number of retries');
75913+
}
7590875914
this.currentProviderIndex = 0;
7590975915
} else {
7591075916
this.currentProviderIndex += 1;

src/locales/es/messages.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/locales/es/messages.po

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgstr ""
88
"Language: es\n"
99
"Project-Id-Version: aave-interface\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"PO-Revision-Date: 2022-12-15 00:17\n"
11+
"PO-Revision-Date: 2022-12-15 18:04\n"
1212
"Last-Translator: \n"
1313
"Language-Team: Spanish\n"
1414
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
@@ -28,7 +28,7 @@ msgstr "<0>Atención:</0> Los cambios de parámetros a través de la gobernanza
2828

2929
#: src/modules/dashboard/lists/SlippageList.tsx
3030
msgid "<0>Slippage tolerance </0><1>{selectedSlippage}% </1><2>{0}</2>"
31-
msgstr ""
31+
msgstr "<0>Tolerancia de deslizamiento </0><1>{selectedSlippage}% </1><2>{0}</2>"
3232

3333
#: src/modules/staking/StakingHeader.tsx
3434
msgid "AAVE holders can stake their AAVE in the Safety Module (Ethereum Network only) to add more security to the protocol and earn Safety Incentives. In the case of a shortfall event, up to 30% of your stake can be slashed to cover the deficit, providing an additional layer of protection for the protocol."
@@ -83,7 +83,7 @@ msgstr "Gobierno de Aave"
8383

8484
#: src/modules/governance/GovernanceTopPanel.tsx
8585
msgid "Aave is a fully decentralized, community governed protocol by the AAVE token-holders. AAVE token-holders collectively discuss, propose, and vote on upgrades to the protocol. AAVE token-holders (Ethereum network only) can either vote themselves on new proposals or delagate to an address of choice. To learn more check out the Governance documentation"
86-
msgstr "Aave es un protocolo completamente descentralizado, gobernado por la comunidad de los poseedores de token AAVE. Los poseedores de token AAVE discuten, proponen y votan colectivamente sobre las actualizaciones del protocolo. Los poseedores de token AAVE (solo en la red Ethereum) pueden votar ellos mismos en nuevas propuestas o delegar su voto a una dirección de su elección. Para obtener más información, consulta la documentación de Gobierno"
86+
msgstr "Aave es un protocolo completamente descentralizado, gobernado por la comunidad de los poseedores de token AAVE. Los poseedores de token AAVE discuten, proponen y votan colectivamente sobre las actualizaciones del protocolo. Los poseedores de token AAVE (solo en la red Ethereum) pueden votar ellos mismos en nuevas propuestas o delegar su voto a una dirección de su elección. Para aprender más, consulta la documentación de Gobierno"
8787

8888
#: src/modules/staking/StakingPanel.tsx
8989
msgid "Aave per month"
@@ -163,19 +163,19 @@ msgstr "La cantidad debe ser mayor que 0"
163163

164164
#: pages/governance/proposal/[proposalId].governance.tsx
165165
msgid "An error has occurred fetching the proposal metadata from IPFS."
166-
msgstr "Se ha producido un error al buscar los metadatos de la propuesta de IPFS."
166+
msgstr "Se ha producido un error al recuperar los metadatos de la propuesta de IPFS."
167167

168168
#: src/components/transactions/TxActionsWrapper.tsx
169169
msgid "Approve Confirmed"
170-
msgstr ""
170+
msgstr "Aprobación confirmada"
171171

172172
#: src/components/transactions/FlowCommons/RightHelperText.tsx
173173
msgid "Approve with"
174-
msgstr ""
174+
msgstr "Aprobar con"
175175

176176
#: src/components/transactions/TxActionsWrapper.tsx
177177
msgid "Approve {symbol} to continue"
178-
msgstr ""
178+
msgstr "Aprueba {symbol} para continuar"
179179

180180
#: src/components/transactions/TxActionsWrapper.tsx
181181
msgid "Approving {symbol}..."
@@ -325,7 +325,7 @@ msgstr "Balance tomado prestado"
325325

326326
#: src/components/transactions/Repay/CollateralRepayModalContent.tsx
327327
msgid "Borrow balance after repay"
328-
msgstr ""
328+
msgstr "Balance tomado prestado tras pagar"
329329

330330
#: src/modules/reserve-overview/BorrowInfo.tsx
331331
msgid "Borrow cap"
@@ -481,15 +481,15 @@ msgstr "Garantía"
481481

482482
#: src/components/transactions/Repay/CollateralRepayModalContent.tsx
483483
msgid "Collateral balance after repay"
484-
msgstr ""
484+
msgstr "Balance de la garantía tras pagar"
485485

486486
#: src/ui-config/errorMapping.tsx
487487
msgid "Collateral is (mostly) the same currency that is being borrowed"
488488
msgstr "La garantía es (en su mayoría) el mismo activo que se está tomando prestado"
489489

490490
#: src/components/transactions/Repay/CollateralRepayModalContent.tsx
491491
msgid "Collateral to repay with"
492-
msgstr ""
492+
msgstr "Garantía a pagar con"
493493

494494
#: src/modules/reserve-overview/SupplyInfo.tsx
495495
#: src/modules/reserve-overview/SupplyInfo.tsx
@@ -503,7 +503,7 @@ msgstr "El uso de garantías está limitado debido al Isolation mode."
503503

504504
#: src/modules/dashboard/lists/SupplyAssetsList/SupplyAssetsList.tsx
505505
msgid "Collateral usage is limited because of isolation mode. <0>Learn More</0>"
506-
msgstr "El uso como garantía está limitado debido al isolation mode. <0>Más información</0>"
506+
msgstr "El uso como garantía está limitado debido al isolation mode. <0>Aprende más</0>"
507507

508508
#: src/components/transactions/FlowCommons/TxModalDetails.tsx
509509
msgid "Collateralization"
@@ -775,7 +775,7 @@ msgstr "Ejecutado"
775775

776776
#: src/components/transactions/Repay/CollateralRepayModalContent.tsx
777777
msgid "Expected amount to repay"
778-
msgstr ""
778+
msgstr "Cantidad esperada a pagar"
779779

780780
#: src/modules/governance/FormattedProposalTime.tsx
781781
msgid "Expires"
@@ -804,7 +804,7 @@ msgstr "Faucet {0}"
804804

805805
#: src/components/transactions/TxActionsWrapper.tsx
806806
msgid "Fetching data..."
807-
msgstr ""
807+
msgstr "Recuperando datos..."
808808

809809
#: src/modules/governance/ProposalsList.tsx
810810
msgid "Filter"
@@ -986,15 +986,15 @@ msgstr "Idioma"
986986
#: src/modules/reserve-overview/SupplyInfo.tsx
987987
#: src/modules/reserve-overview/SupplyInfo.tsx
988988
msgid "Learn more"
989-
msgstr "Más información"
989+
msgstr "Aprende más"
990990

991991
#: src/modules/staking/StakingHeader.tsx
992992
msgid "Learn more about risks involved"
993-
msgstr "Más información sobre los riesgos involucrados"
993+
msgstr "Aprende más sobre los riesgos involucrados"
994994

995995
#: src/components/isolationMode/IsolatedTooltip.tsx
996996
msgid "Learn more in our <0>FAQ guide</0>"
997-
msgstr "Más información en nuestra guía <0>Preguntas frecuentes</0>"
997+
msgstr "Aprende más en nuestra guía <0>Preguntas frecuentes</0>"
998998

999999
#: src/layouts/MobileMenu.tsx
10001000
msgid "Links"
@@ -1132,7 +1132,7 @@ msgstr "Nuevo APY"
11321132

11331133
#: src/components/transactions/Swap/SwapModalDetails.tsx
11341134
msgid "No"
1135-
msgstr ""
1135+
msgstr "No"
11361136

11371137
#: src/components/transactions/StakeRewardClaim/StakeRewardClaimModalContent.tsx
11381138
msgid "No rewards to claim"
@@ -1263,15 +1263,15 @@ msgstr "La dirección del proveedor del pool no esta registrada"
12631263

12641264
#: src/modules/dashboard/lists/SlippageList.tsx
12651265
msgid "Powered by"
1266-
msgstr ""
1266+
msgstr "Powered by"
12671267

12681268
#: src/components/infoTooltips/PriceImpactTooltip.tsx
12691269
msgid "Price impact is the spread between the total value of the entry tokens swapped and the destination tokens obtained (in USD), which results from the limited liquidity of the trading pair."
1270-
msgstr ""
1270+
msgstr "El impacto en el precio es la diferencia entre el valor total de los tokens de entrada intercambiados y el de los tokens de destino obtenidos (en USD), que resulta de la liquidez limitada del par del intercambio."
12711271

12721272
#: src/components/infoTooltips/PriceImpactTooltip.tsx
12731273
msgid "Price impact {0}%"
1274-
msgstr ""
1274+
msgstr "Impacto en el precio {0}%"
12751275

12761276
#: pages/governance/proposal/[proposalId].governance.tsx
12771277
msgid "Proposal details"
@@ -1358,7 +1358,7 @@ msgstr "Suministro restante"
13581358

13591359
#: src/components/transactions/Repay/CollateralRepayModalContent.tsx
13601360
msgid "Repaid"
1361-
msgstr ""
1361+
msgstr "Pagado"
13621362

13631363
#: src/components/transactions/Repay/RepayModal.tsx
13641364
#: src/modules/dashboard/lists/BorrowedPositionsList/BorrowedPositionsListItem.tsx
@@ -1451,7 +1451,7 @@ msgstr "Seleccionar idioma"
14511451

14521452
#: src/modules/dashboard/lists/SlippageList.tsx
14531453
msgid "Select slippage tolerance"
1454-
msgstr ""
1454+
msgstr "Seleccionar tolerancia de deslizamiento"
14551455

14561456
#: src/modules/reserve-overview/AddTokenDropdown.tsx
14571457
msgid "Select token to add"
@@ -1487,7 +1487,7 @@ msgstr "Puesto que esta es una red de pruebas, puedes obtener cualquiera de los
14871487

14881488
#: src/components/infoTooltips/SlippageTooltip.tsx
14891489
msgid "Slippage is the difference between the quoted and received amounts from changing market conditions between the moment the transaction is submitted and its verification."
1490-
msgstr ""
1490+
msgstr "El deslizamiento es la diferencia entre las cantidades calculadas y las recibidas debido a las condiciones cambiantes del mercado entre el momento en que se envía la transacción y su verificación."
14911491

14921492
#: pages/500.page.tsx
14931493
#: src/modules/reserve-overview/graphs/ApyGraphContainer.tsx
@@ -1592,7 +1592,7 @@ msgstr "Suministrado"
15921592

15931593
#: src/components/transactions/Swap/SwapModalContent.tsx
15941594
msgid "Supplied asset amount"
1595-
msgstr ""
1595+
msgstr "Cantidad de activos suministrados"
15961596

15971597
#: pages/index.page.tsx
15981598
#: src/components/transactions/Supply/SupplyModal.tsx
@@ -1627,7 +1627,7 @@ msgstr "Balance de suministro"
16271627

16281628
#: src/components/transactions/Swap/SwapModalDetails.tsx
16291629
msgid "Supply balance after swap"
1630-
msgstr ""
1630+
msgstr "Balance de suministro tras el intercambio"
16311631

16321632
#: src/ui-config/errorMapping.tsx
16331633
msgid "Supply cap is exceeded"
@@ -1659,7 +1659,7 @@ msgstr "Intercambiar"
16591659

16601660
#: src/components/transactions/Swap/SwapModalContent.tsx
16611661
msgid "Swap to"
1662-
msgstr ""
1662+
msgstr "Intercambiar a"
16631663

16641664
#: src/components/transactions/Swap/SwapModalContent.tsx
16651665
msgid "Swapped"
@@ -1880,7 +1880,7 @@ msgstr "Para tomar prestado, necesitas suministrar cualquier activo para ser uti
18801880

18811881
#: src/components/infoTooltips/ApprovalTooltip.tsx
18821882
msgid "To continue, you need to grant Aave smart contracts permission to move your funds from your wallet. Depending on the asset and wallet you use, it is done by signing the permission message (gas free), or by submitting an approval transaction (requires gas). <0>Learn more</0>"
1883-
msgstr ""
1883+
msgstr "Para continuar, necesitas otorgar permiso a los contratos inteligentes de Aave para mover tus fondos de tu cartera. Según el activo y la cartera que uses, se hace firmando el mensaje de permiso (sin coste de gas), o enviando una transacción de aprobación (requiere coste de gas). <0>Aprende más</0>"
18841884

18851885
#: src/components/transactions/Emode/EmodeModalContent.tsx
18861886
msgid "To enable E-mode for the {0} category, all borrow positions outside of this cateogry must be closed."
@@ -2156,7 +2156,7 @@ msgstr "Con un poder de votación de <0/>"
21562156

21572157
#: src/modules/faucet/FaucetTopPanel.tsx
21582158
msgid "With testnet Faucet you can get free assets to test the Aave Protocol. Make sure to switch your wallet provider to the appropriate testnet network, select desired asset, and click ‘Faucet’ to get tokens transferred to your wallet. The assets on a testnet are not “real,” meaning they have no monetary value. <0>Learn more</0>"
2159-
msgstr "Con la testnet Faucet puedes obtener activos gratuitos para probar el Protocolo Aave. Asegúrate de cambiar tu proveedor de cartera a la red de testnet adecuada, selecciona el activo deseado y haz clic en \"Faucet\" para obtener tokens transferidos a tu cartera. Los activos de una testnet no son \"reales\", lo que significada que no tienen valor monetario. <0>Más información</0>"
2159+
msgstr "Con la testnet Faucet puedes obtener activos gratuitos para probar el Protocolo Aave. Asegúrate de cambiar tu proveedor de cartera a la red de testnet adecuada, selecciona el activo deseado y haz clic en \"Faucet\" para obtener tokens transferidos a tu cartera. Los activos de una testnet no son \"reales\", lo que significada que no tienen valor monetario. <0>Aprende más</0>"
21602160

21612161
#: src/components/transactions/Withdraw/WithdrawModal.tsx
21622162
#: src/modules/dashboard/lists/SuppliedPositionsList/SuppliedPositionsListItem.tsx
@@ -2186,7 +2186,7 @@ msgstr "YAE"
21862186

21872187
#: src/components/transactions/Swap/SwapModalDetails.tsx
21882188
msgid "Yes"
2189-
msgstr ""
2189+
msgstr ""
21902190

21912191
#: src/components/transactions/Warnings/IsolationModeWarning.tsx
21922192
msgid "You are entering Isolation mode"
@@ -2410,7 +2410,7 @@ msgstr "{0}{name}"
24102410

24112411
#: src/components/transactions/FlowCommons/ApprovalMethodToggleButton.tsx
24122412
msgid "{currentMethod}"
2413-
msgstr ""
2413+
msgstr "{currentMethod}"
24142414

24152415
#: src/modules/staking/StakingPanel.tsx
24162416
msgid "{d}d"

src/static-build/proposals.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5361,8 +5361,8 @@
53615361
"startBlock": 16176459,
53625362
"endBlock": 16195659,
53635363
"executionTime": 0,
5364-
"forVotes": "275326484592436020115056",
5365-
"againstVotes": "275956885561522300",
5364+
"forVotes": "548867553163281922225273",
5365+
"againstVotes": "445913153828952719",
53665366
"executed": false,
53675367
"canceled": false,
53685368
"strategy": "0xb7e383ef9B1E9189Fc0F71fb30af8aa14377429e",
@@ -5375,7 +5375,7 @@
53755375
"ipfsHash": "0x780a2b877ea3b13c924a30d2959ea0b8f0257799f1d4d743ed58f8783f529954",
53765376
"startTimestamp": 1670942759,
53775377
"creationTimestamp": 1670855735,
5378-
"expirationTimestamp": 1671173855
5378+
"expirationTimestamp": 1671174407
53795379
},
53805380
{
53815381
"id": 131,
@@ -5396,8 +5396,8 @@
53965396
"startBlock": 16183841,
53975397
"endBlock": 16203041,
53985398
"executionTime": 0,
5399-
"forVotes": "22980441186900064326918",
5400-
"againstVotes": "100000000000000000",
5399+
"forVotes": "304435755361199074845394",
5400+
"againstVotes": "306316243345173621",
54015401
"executed": false,
54025402
"canceled": false,
54035403
"strategy": "0xb7e383ef9B1E9189Fc0F71fb30af8aa14377429e",
@@ -5410,7 +5410,7 @@
54105410
"ipfsHash": "0x78ce0d63ca0c186ca3f58e712d3f1861ced3dad15ce3ad4f0e005d1663b49caf",
54115411
"startTimestamp": 1671031859,
54125412
"creationTimestamp": 1670944979,
5413-
"expirationTimestamp": 1671262439
5413+
"expirationTimestamp": 1671262991
54145414
}
54155415
]
54165416
}

src/utils/__tests__/RotationProvider.test.ts

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,24 @@ it('rotates through providers on error', async () => {
2424
expect(errors).toEqual([...badUrls]);
2525
});
2626

27-
it('waits for the rotation delay time after all providers have failed', (done) => {
27+
it('loops through provider array for maxRetries', async () => {
2828
const badUrls = ['http://some-fake-url-1', 'http://some-fake-url-2', 'http://some-fake-url-3'];
29-
const rotationProvider = new RotationProvider(badUrls, ChainId.mainnet, { rotationDelay: 1000 });
29+
const rotationProvider = new RotationProvider(badUrls, ChainId.mainnet, { maxRetries: 7 });
3030

3131
const errors: string[] = [];
32-
let start: number;
32+
let retries = 0;
3333
rotationProvider.on('debug', (error: { action: string; provider: StaticJsonRpcProvider }) => {
3434
errors.push(error.provider.connection.url);
35-
if (start) {
36-
expect(Date.now() - start).toBeGreaterThan(1000);
37-
done();
38-
}
39-
40-
// Once we've seen errors on all providers, start the timer.
41-
// We should see another error after the rotation delay time.
42-
if (errors.length === badUrls.length) {
43-
start = Date.now();
35+
// Once we've seen errors on all providers, update retry count
36+
if (errors.length % badUrls.length === 0) {
37+
retries += 1;
4438
}
4539
});
4640

4741
// We don't care about the result, we just need to fire off a request
48-
rotationProvider.getBlock(15741825);
42+
await rotationProvider.getBlock(15741825).catch(() => {
43+
expect(retries).toBe(7);
44+
});
4945
});
5046

5147
it('rotates back to first provider after delay', (done) => {

0 commit comments

Comments
 (0)