Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:Emurgo/yoroi-frontend into feat/…
Browse files Browse the repository at this point in the history
…YOEXT-1080/dark-theme
  • Loading branch information
Patriciu Nista committed Apr 28, 2024
2 parents b27ba4c + ef377ca commit d3e434c
Show file tree
Hide file tree
Showing 50 changed files with 2,036 additions and 1,778 deletions.
1 change: 1 addition & 0 deletions packages/yoroi-extension/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ module.exports = {
],
'import/no-unused-modules': [1, { unusedExports: true }],
'camelcase': 0,
'react/jsx-curly-brace-presence': 0,
},
plugins: [
'import',
Expand Down
9 changes: 9 additions & 0 deletions packages/yoroi-extension/app/Routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ const SwapPage = React.lazy(SwapPagePromise);
const SwapOrdersPagePromise = () => import('./containers/swap/orders/OrdersPage');
const SwapOrdersPage = React.lazy(SwapOrdersPagePromise);

const ExchangeEndPagePromise = () => import('./containers/ExchangeEndPage');
const ExchangeEndPage = React.lazy(ExchangeEndPagePromise);

export const LazyLoadPromises: Array<() => any> = [
AddAnotherWalletPromise,
StakingPageContentPromise,
Expand Down Expand Up @@ -175,6 +178,7 @@ export const LazyLoadPromises: Array<() => any> = [
SwapOrdersPagePromise,
OptForAnalyticsPagePromise,
AnalyticsSettingsPagePromise,
ExchangeEndPagePromise,
];

// populated by ConfigWebpackPlugin
Expand Down Expand Up @@ -309,6 +313,11 @@ export const Routes = (stores: StoresMap, actions: ActionsMap): Node => (
path={ROUTES.REVAMP.CATALYST_VOTING}
component={props => <VotingPage {...props} stores={stores} actions={actions} />}
/>
<Route
exact
path={ROUTES.EXCHANGE_END}
component={props => <ExchangeEndPage {...props} stores={stores} actions={actions} />}
/>
<Redirect to={ROUTES.MY_WALLETS} />
</Switch>
</Suspense>
Expand Down
17 changes: 11 additions & 6 deletions packages/yoroi-extension/app/api/ada/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,11 @@ export type CreateUnsignedTxForConnectorRequest = {|
submittedTxs: Array<PersistedSubmittedTransaction>,
utxos: Array<CardanoAddressedUtxo>,
|};
export type CreateUnsignedTxResponse = HaskellShelleyTxSignRequest;
export type CreateVotingRegTxResponse = HaskellShelleyTxSignRequest;
export type CreateUnsignedTxFunc = (
request: CreateUnsignedTxRequest
) => Promise<CreateUnsignedTxResponse>;

// createUnsignedTxForUtxos

Expand Down Expand Up @@ -378,7 +383,7 @@ export type CreateDelegationTxFunc = (

export type CreateVotingRegTxFunc = (
request: CreateVotingRegTxRequest
) => Promise<HaskellShelleyTxSignRequest>;
) => Promise<CreateVotingRegTxResponse>;

// createWithdrawalTx

Expand Down Expand Up @@ -452,7 +457,7 @@ export type TransferToCip1852Request = {|
defaultToken: $ReadOnly<TokenRow>,
|};
export type TransferToCip1852Response = {|
signRequest: HaskellShelleyTxSignRequest,
signRequest: CreateUnsignedTxResponse,
publicKey: {|
key: RustModule.WalletV4.Bip32PublicKey,
...Addressing,
Expand Down Expand Up @@ -968,13 +973,13 @@ export default class AdaApi {
`${nameof(AdaApi)}::${nameof(this.createUnsignedTxForUtxos)} error: ` + stringifyError(error)
);
if (error instanceof LocalizableError) throw error;
throw error;
throw new GenericApiError();
}
}

async createUnsignedTx(
request: CreateUnsignedTxRequest
): Promise<HaskellShelleyTxSignRequest> {
): Promise<CreateUnsignedTxResponse> {
const utxos = await request.publicDeriver.getAllUtxos();
const filteredUtxos = utxos.filter(utxo => request.filter(utxo));

Expand Down Expand Up @@ -1009,7 +1014,7 @@ export default class AdaApi {
async createUnsignedTxForConnector(
request: CreateUnsignedTxForConnectorRequest,
foreignUtxoFetcher: ?ForeignUtxoFetcher,
): Promise<HaskellShelleyTxSignRequest> {
): Promise<CreateUnsignedTxResponse> {
const {
includeInputs,
includeOutputs,
Expand Down Expand Up @@ -1657,7 +1662,7 @@ export default class AdaApi {

async createVotingRegTx(
request: CreateVotingRegTxRequest
): Promise<HaskellShelleyTxSignRequest> {
): Promise<CreateVotingRegTxResponse> {
Logger.debug(`${nameof(AdaApi)}::${nameof(this.createVotingRegTx)} called`);

try {
Expand Down

0 comments on commit d3e434c

Please sign in to comment.