Skip to content

Commit 5a127a2

Browse files
fix: handle blocked staking rewards error for hardware wallets [LW-11931] (#3253)
Signed-off-by: Dominik Guzei <[email protected]> Co-authored-by: Szymon Masłowski <[email protected]>
1 parent f7e8c5e commit 5a127a2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

source/renderer/app/api/api.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1318,7 +1318,13 @@ export default class AdaApi {
13181318
logger.error('AdaApi::createExternalTransaction error', {
13191319
error,
13201320
});
1321-
throw new ApiError(error).result();
1321+
1322+
const apiError = new ApiError(error)
1323+
.set('conwayWalletNotDelegatedToDRep')
1324+
.where('code', 'created_invalid_transaction')
1325+
.inc('message', 'ConwayWdrlNotDelegatedToDRep');
1326+
1327+
throw apiError.result();
13221328
}
13231329
};
13241330
inspectAddress = async (request: {

0 commit comments

Comments
 (0)