-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: compatible ckb-cli tx multisig file
- Loading branch information
1 parent
bed901b
commit 3677308
Showing
4 changed files
with
73 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
export function hump(param: any) { | ||
Object.keys(param).map(key => { | ||
let item = param[key] | ||
if (item instanceof Object || item instanceof Array) { | ||
hump(item) | ||
} | ||
if (humpString(key) !== key) { | ||
param[humpString(key)] = param[key] | ||
delete param[key] | ||
} | ||
}) | ||
return param | ||
} | ||
|
||
export function humpString(key: string) { | ||
let keyArr = key.split('_') | ||
for (let i = 0; i < keyArr.length; i++) { | ||
if (i !== 0) { | ||
keyArr[i] = keyArr[i][0].toUpperCase() + keyArr[i].substr(1) | ||
} | ||
} | ||
return keyArr.join('') | ||
} | ||
|
||
export default { hump, humpString } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3677308
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Packaging for test is done in 9245269938