diff --git a/backend/app/Savor22b/GraphTypes/Query/Query.cs b/backend/app/Savor22b/GraphTypes/Query/Query.cs index 756e512e..3b08f5c0 100644 --- a/backend/app/Savor22b/GraphTypes/Query/Query.cs +++ b/backend/app/Savor22b/GraphTypes/Query/Query.cs @@ -577,6 +577,46 @@ swarm is null } ); + Field>( + "createAction_UpdateTradeGoodAction", + description: "무역상점 상품 가격 수정", + arguments: new QueryArguments( + new QueryArgument> + { + Name = "publicKey", + Description = "The base64-encoded public key for Transaction.", + }, + new QueryArgument> + { + Name = "productId", + Description = "상품 고유 Id", + }, + new QueryArgument> + { + Name = "price", + Description = "가격", + } + ), + resolve: context => + { + var publicKey = new PublicKey( + ByteUtil.ParseHex(context.GetArgument("publicKey")) + ); + var price = FungibleAssetValue.Parse(Currencies.KeyCurrency, context.GetArgument("price").ToString()); + + var action = new UpdateTradeGoodAction( + context.GetArgument("productId"), + price); + + return new GetUnsignedTransactionHex( + action, + publicKey, + _blockChain, + _swarm + ).UnsignedTransactionHex; + } + ); + Field>( "createAction_BuyTradeGoodAction", description: "무역상점 구매",