chore: display generic error returned from the router
This commit is contained in:
parent
790d34d875
commit
b8ffa65113
|
@ -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:
|
||||
|
|
|
@ -212,7 +212,7 @@ Item {
|
|||
width: parent.width - 2*Style.current.bigPadding
|
||||
text: root.routerErrorDetails
|
||||
font.pixelSize: Style.current.tertiaryTextFontSize
|
||||
elide: Text.ElideRight
|
||||
wrapMode: Text.WrapAnywhere
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1059,6 +1059,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