refactor: advanced custom channel route editor (#6865)
* refactor: advanced custom channel route editor * fix(channels): show raw balance response from balance cell
This commit is contained in:
@@ -22,6 +22,14 @@ func Marshal(v any) ([]byte, error) {
|
||||
return json.Marshal(v)
|
||||
}
|
||||
|
||||
func IndentJson(data []byte) ([]byte, error) {
|
||||
var buffer bytes.Buffer
|
||||
if err := json.Indent(&buffer, data, "", " "); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return buffer.Bytes(), nil
|
||||
}
|
||||
|
||||
func GetJsonType(data json.RawMessage) string {
|
||||
trimmed := bytes.TrimSpace(data)
|
||||
if len(trimmed) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user