File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
contract/AElf.Contracts.MultiToken Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -215,10 +215,16 @@ private Address ExtractTokenContractAddress(ByteString bytes)
215215 private void AssertCrossChainTransaction ( Transaction originalTransaction , Address validAddress ,
216216 params string [ ] validMethodNames )
217217 {
218- var validateResult = validMethodNames . Contains ( originalTransaction . MethodName )
218+ var validateResult = validMethodNames . Contains ( MaybeRecoverInlineTransactionFunctionName ( originalTransaction . MethodName ) )
219219 && originalTransaction . To == validAddress ;
220220 Assert ( validateResult , "Invalid transaction." ) ;
221221 }
222+
223+ private static string MaybeRecoverInlineTransactionFunctionName ( string methodName )
224+ {
225+ var parts = methodName . Split ( '.' ) ;
226+ return parts . Length > 1 ? parts [ ^ 2 ] : methodName ;
227+ }
222228
223229 private void RegisterTokenInfo ( TokenInfo tokenInfo )
224230 {
You can’t perform that action at this time.
0 commit comments