chore: display generic error returned from the router (#16078)
This commit is contained in:
parent
24a386d078
commit
1231660855
|
@ -139,6 +139,8 @@ QtObject {
|
|||
}
|
||||
|
||||
switch(code) {
|
||||
case Constants.routerErrorCodes.errGeneric:
|
||||
return qsTr("unknown error occurred, try again later")
|
||||
case Constants.routerErrorCodes.processor.errFailedToParseBaseFee:
|
||||
case Constants.routerErrorCodes.processor.errFailedToParsePercentageFee:
|
||||
case Constants.routerErrorCodes.processor.errContractNotFound:
|
||||
|
@ -221,6 +223,8 @@ QtObject {
|
|||
}
|
||||
|
||||
switch(code) {
|
||||
case Constants.routerErrorCodes.errGeneric:
|
||||
return details
|
||||
case Constants.routerErrorCodes.processor.errFailedToParseBaseFee:
|
||||
return qsTr("failed to parse base fee")
|
||||
case Constants.routerErrorCodes.processor.errFailedToParsePercentageFee:
|
||||
|
|
|
@ -193,7 +193,7 @@ Item {
|
|||
width: parent.width - 2*Style.current.bigPadding
|
||||
text: root.routerErrorDetails
|
||||
font.pixelSize: Style.current.tertiaryTextFontSize
|
||||
elide: Text.ElideRight
|
||||
wrapMode: Text.WrapAnywhere
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1072,6 +1072,9 @@ QtObject {
|
|||
}
|
||||
|
||||
readonly property QtObject routerErrorCodes: QtObject {
|
||||
|
||||
readonly property string errGeneric: "0"
|
||||
|
||||
readonly property QtObject processor: QtObject {
|
||||
readonly property string errFailedToParseBaseFee : "WPP-001"
|
||||
readonly property string errFailedToParsePercentageFee : "WPP-002"
|
||||
|
|
Loading…
Reference in New Issue