5151 party
5252 | shop
5353 | wallet
54- | identity
5554 | payment_tool
5655 | provider
5756 | terminal
@@ -675,7 +674,6 @@ enumerate_context_bits(Types) ->
675674 [
676675 party ,
677676 shop ,
678- identity ,
679677 wallet ,
680678 payment_tool ,
681679 provider ,
@@ -707,13 +705,13 @@ squash_scope_types([party, shop | Rest]) ->
707705 % NOTE
708706 % Shop scope implies party scope.
709707 [shop | squash_scope_types (Rest )];
710- squash_scope_types ([identity , wallet | Rest ]) ->
708+ squash_scope_types ([party , wallet | Rest ]) ->
711709 % NOTE
712- % Wallet scope implies identity scope.
710+ % Wallet scope implies party scope.
713711 [wallet | squash_scope_types (Rest )];
714712squash_scope_types ([provider , terminal | Rest ]) ->
715713 % NOTE
716- % Provider scope implies identity scope.
714+ % Provider scope implies provider scope.
717715 [terminal | squash_scope_types (Rest )];
718716squash_scope_types ([Type | Rest ]) ->
719717 [Type | squash_scope_types (Rest )];
@@ -729,10 +727,8 @@ get_context_bits(shop) ->
729727 [{from , owner_id }, {from , shop_id }];
730728get_context_bits (payment_tool ) ->
731729 [{from , payment_tool }];
732- get_context_bits (identity ) ->
733- [{prefix , <<" identity" >>}, {from , identity_id }];
734730get_context_bits (wallet ) ->
735- [{prefix , <<" wallet" >>}, {from , identity_id }, {from , wallet_id }];
731+ [{prefix , <<" wallet" >>}, {from , owner_id }, {from , wallet_id }];
736732get_context_bits (provider ) ->
737733 [{prefix , <<" provider" >>}, {from , provider_id }];
738734get_context_bits (terminal ) ->
@@ -1066,9 +1062,9 @@ check_calculate_year_shard_id_test() ->
10661062 }
10671063}).
10681064
1069- - define (WITHDRAWAL (OwnerID , IdentityID , PaymentTool ), # wthd_domain_Withdrawal {
1065+ - define (WITHDRAWAL (OwnerID , PaymentTool ), # wthd_domain_Withdrawal {
10701066 destination = PaymentTool ,
1071- sender = # wthd_domain_Identity { id = IdentityID , owner_id = OwnerID } ,
1067+ sender = OwnerID ,
10721068 created_at = <<" 2000-02-02T12:12:12Z" >>,
10731069 body = # domain_Cash {amount = 42 , currency = # domain_CurrencyRef {symbolic_code = <<" CNY" >>}}
10741070}).
@@ -1112,7 +1108,7 @@ prefix_content_test_() ->
11121108 },
11131109 WithdrawalContext = #{
11141110 context => ? WITHDRAWAL_CTX (
1115- ? WITHDRAWAL (<<" OWNER" >>, << " IDENTITY " >>, ? PAYMENT_TOOL ),
1111+ ? WITHDRAWAL (<<" OWNER" >>, ? PAYMENT_TOOL ),
11161112 <<" WALLET" >>,
11171113 ? ROUTE (22 , 2 )
11181114 )
@@ -1138,13 +1134,12 @@ prefix_content_test_() ->
11381134 ),
11391135 ? _assertEqual (
11401136 {ok ,
1141- {<<" /OWNER/wallet/IDENTITY/WALLET" >>, #{
1142- <<" Scope.identity_id" >> => <<" IDENTITY" >>,
1137+ {<<" /wallet/OWNER/WALLET" >>, #{
11431138 <<" Scope.owner_id" >> => <<" OWNER" >>,
11441139 <<" Scope.prefix" >> => <<" wallet" >>,
11451140 <<" Scope.wallet_id" >> => <<" WALLET" >>
11461141 }}},
1147- mk_scope_prefix_impl (ordsets :from_list ([wallet , identity , party ]), withdrawal_processing , WithdrawalContext )
1142+ mk_scope_prefix_impl (ordsets :from_list ([wallet , party ]), withdrawal_processing , WithdrawalContext )
11481143 ),
11491144 ? _assertEqual (
11501145 {ok ,
0 commit comments