Skip to content

Commit

Permalink
fix Interactor.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Euraxluo committed Dec 25, 2023
1 parent 00a2046 commit 0008db0
Showing 1 changed file with 7 additions and 20 deletions.
27 changes: 7 additions & 20 deletions src/Interactor.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,26 +71,13 @@ function Main(props) {
if (metaType.isPlain) {
// Do nothing as `paramFields` is already set to []
} else if (metaType.isMap) {
paramFields = [
{
name: metaType.asMap.key.toString(),
type: metaType.asMap.key.toString(),
optional: false,
},
]
} else if (metaType.isDoubleMap) {
paramFields = [
{
name: metaType.asDoubleMap.key1.toString(),
type: metaType.asDoubleMap.key1.toString(),
optional: false,
},
{
name: metaType.asDoubleMap.key2.toString(),
type: metaType.asDoubleMap.key2.toString(),
optional: false,
},
]
paramFields = Object.keys(metaType.asMap['hashers']).map((key) => {
return {
name: key.toString(),
type: metaType.asMap['hashers'][key].toString(),
optional: false
};
}).filter(item => !isNaN(parseInt(item.name)));
}
} else if (interxType === 'EXTRINSIC') {
const metaArgs = api.tx[palletRpc][callable].meta.args
Expand Down

0 comments on commit 0008db0

Please sign in to comment.